File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -1594,30 +1594,6 @@ def test_unexpected_error(self):
15941594 mock_close .assert_called ()
15951595 self .assertEqual (os .listdir (dir ), [])
15961596
1597- @os_helper .skip_unless_hardlink
1598- @unittest .skipUnless (tempfile ._O_TMPFILE_WORKS , 'need os.O_TMPFILE' )
1599- @unittest .skipUnless (os .path .exists ('/proc/self/fd' ),
1600- 'need /proc/self/fd' )
1601- def test_link_tmpfile (self ):
1602- dir = tempfile .mkdtemp ()
1603- self .addCleanup (os_helper .rmtree , dir )
1604- filename = os .path .join (dir , "link" )
1605-
1606- with tempfile .TemporaryFile ('w' , dir = dir ) as tmp :
1607- # the flag can become False on Linux <= 3.11
1608- if not tempfile ._O_TMPFILE_WORKS :
1609- self .skipTest ("O_TMPFILE doesn't work" )
1610-
1611- tmp .write ("hello" )
1612- tmp .flush ()
1613- fd = tmp .fileno ()
1614-
1615- os .link (f'/proc/self/fd/{ fd } ' ,
1616- filename ,
1617- follow_symlinks = True )
1618- with open (filename ) as fp :
1619- self .assertEqual (fp .read (), "hello" )
1620-
16211597
16221598# Helper for test_del_on_shutdown
16231599class NulledModules :
You can’t perform that action at this time.
0 commit comments