MCPcopy Index your code
hub / github.com/python/cpython / test_sameopenfile

Method test_sameopenfile

Lib/test/test_genericpath.py:318–327  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

316 self.skipTest('os.link(): %s' % e)
317
318 def test_sameopenfile(self):
319 filename = os_helper.TESTFN
320 self.addCleanup(os_helper.unlink, filename)
321 create_file(filename)
322
323 with open(filename, "rb", 0) as fp1:
324 fd1 = fp1.fileno()
325 with open(filename, "rb", 0) as fp2:
326 fd2 = fp2.fileno()
327 self.assertTrue(self.pathmodule.sameopenfile(fd1, fd2))
328
329 def test_realpath_mode_values(self):
330 for name in 'ALL_BUT_LAST', 'ALLOW_MISSING':

Callers

nothing calls this directly

Calls 5

addCleanupMethod · 0.80
assertTrueMethod · 0.80
create_fileFunction · 0.70
openFunction · 0.50
filenoMethod · 0.45

Tested by

no test coverage detected