MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_samefile

Method test_samefile

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

Source from the content-addressed store, hash-verified

227 os_helper.rmdir(filename)
228
229 def test_samefile(self):
230 file1 = os_helper.TESTFN
231 file2 = os_helper.TESTFN + "2"
232 self.addCleanup(os_helper.unlink, file1)
233 self.addCleanup(os_helper.unlink, file2)
234
235 create_file(file1)
236 self.assertTrue(self.pathmodule.samefile(file1, file1))
237
238 create_file(file2)
239 self.assertFalse(self.pathmodule.samefile(file1, file2))
240
241 self.assertRaises(TypeError, self.pathmodule.samefile)
242
243 def _test_samefile_on_link_func(self, func):
244 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