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

Method test_same_file

Lib/test/test_shutil.py:3218–3224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3216 assert not m.called
3217
3218 def test_same_file(self):
3219 self.addCleanup(self.reset)
3220 with self.get_files() as (src, dst):
3221 with self.assertRaises((OSError, _GiveupOnFastCopy)):
3222 self.zerocopy_fun(src, src)
3223 # Make sure src file is not corrupted.
3224 self.assertEqual(read_file(TESTFN, binary=True), self.FILEDATA)
3225
3226 def test_non_existent_src(self):
3227 name = tempfile.mktemp(dir=os.getcwd())

Callers

nothing calls this directly

Calls 6

get_filesMethod · 0.95
zerocopy_funMethod · 0.95
read_fileFunction · 0.85
addCleanupMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected