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

Method test_samefile

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

Source from the content-addressed store, hash-verified

233 os_helper.rmdir(filename)
234
235 def test_samefile(self):
236 file1 = os_helper.TESTFN
237 file2 = os_helper.TESTFN + "2"
238 self.addCleanup(os_helper.unlink, file1)
239 self.addCleanup(os_helper.unlink, file2)
240
241 create_file(file1)
242 self.assertTrue(self.pathmodule.samefile(file1, file1))
243
244 create_file(file2)
245 self.assertFalse(self.pathmodule.samefile(file1, file2))
246
247 self.assertRaises(TypeError, self.pathmodule.samefile)
248
249 def _test_samefile_on_link_func(self, func):
250 test_fn1 = os_helper.TESTFN

Callers

nothing calls this directly

Calls 6

addCleanupMethod · 0.80
assertTrueMethod · 0.80
samefileMethod · 0.80
assertFalseMethod · 0.80
create_fileFunction · 0.70
assertRaisesMethod · 0.45

Tested by

no test coverage detected