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

Method test_regular_copy

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

Source from the content-addressed store, hash-verified

3206 # ---
3207
3208 def test_regular_copy(self):
3209 with self.get_files() as (src, dst):
3210 self.zerocopy_fun(src, dst)
3211 self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA)
3212 # Make sure the fallback function is not called.
3213 with self.get_files() as (src, dst):
3214 with unittest.mock.patch('shutil.copyfileobj') as m:
3215 shutil.copyfile(TESTFN, TESTFN2)
3216 assert not m.called
3217
3218 def test_same_file(self):
3219 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