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

Method test_regular_copy

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

Source from the content-addressed store, hash-verified

3180 # ---
3181
3182 def test_regular_copy(self):
3183 with self.get_files() as (src, dst):
3184 self.zerocopy_fun(src, dst)
3185 self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA)
3186 # Make sure the fallback function is not called.
3187 with self.get_files() as (src, dst):
3188 with unittest.mock.patch('shutil.copyfileobj') as m:
3189 shutil.copyfile(TESTFN, TESTFN2)
3190 assert not m.called
3191
3192 def test_same_file(self):
3193 self.addCleanup(self.reset)

Callers

nothing calls this directly

Calls 5

get_filesMethod · 0.95
zerocopy_funMethod · 0.95
read_fileFunction · 0.85
copyfileMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected