File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1594,6 +1594,7 @@ def test_unexpected_error(self):
1594
1594
mock_close .assert_called ()
1595
1595
self .assertEqual (os .listdir (dir ), [])
1596
1596
1597
+ @os_helper .skip_unless_hardlink
1597
1598
@unittest .skipUnless (tempfile ._O_TMPFILE_WORKS , 'need os.O_TMPFILE' )
1598
1599
@unittest .skipUnless (os .path .exists ('/proc/self/fd' ),
1599
1600
'need /proc/self/fd' )
@@ -1611,14 +1612,9 @@ def test_link_tmpfile(self):
1611
1612
tmp .flush ()
1612
1613
fd = tmp .fileno ()
1613
1614
1614
- try :
1615
- os .link (f'/proc/self/fd/{ fd } ' ,
1616
- filename ,
1617
- follow_symlinks = True )
1618
- except PermissionError as exc :
1619
- # gh-136156: link() fails with PermissionError on Android
1620
- self .skipTest (f"os.link: { exc !r} " )
1621
-
1615
+ os .link (f'/proc/self/fd/{ fd } ' ,
1616
+ filename ,
1617
+ follow_symlinks = True )
1622
1618
with open (filename ) as fp :
1623
1619
self .assertEqual (fp .read (), "hello" )
1624
1620
You can’t perform that action at this time.
0 commit comments