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

Method test_same_file

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

Source from the content-addressed store, hash-verified

3190 assert not m.called
3191
3192 def test_same_file(self):
3193 self.addCleanup(self.reset)
3194 with self.get_files() as (src, dst):
3195 with self.assertRaises((OSError, _GiveupOnFastCopy)):
3196 self.zerocopy_fun(src, src)
3197 # Make sure src file is not corrupted.
3198 self.assertEqual(read_file(TESTFN, binary=True), self.FILEDATA)
3199
3200 def test_non_existent_src(self):
3201 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