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

Method _test_samestat_on_link_func

Lib/test/test_genericpath.py:285–299  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

283 self.assertRaises(TypeError, self.pathmodule.samestat)
284
285 def _test_samestat_on_link_func(self, func):
286 test_fn1 = os_helper.TESTFN + "1"
287 test_fn2 = os_helper.TESTFN + "2"
288 self.addCleanup(os_helper.unlink, test_fn1)
289 self.addCleanup(os_helper.unlink, test_fn2)
290
291 create_file(test_fn1)
292 func(test_fn1, test_fn2)
293 self.assertTrue(self.pathmodule.samestat(os.stat(test_fn1),
294 os.stat(test_fn2)))
295 os.remove(test_fn2)
296
297 create_file(test_fn2)
298 self.assertFalse(self.pathmodule.samestat(os.stat(test_fn1),
299 os.stat(test_fn2)))
300
301 @os_helper.skip_unless_symlink
302 def test_samestat_on_symlink(self):

Callers 2

test_samestat_on_linkMethod · 0.95

Calls 7

addCleanupMethod · 0.80
assertTrueMethod · 0.80
assertFalseMethod · 0.80
create_fileFunction · 0.70
funcFunction · 0.70
statMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected