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

Method test_non_regular_file_src

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

Source from the content-addressed store, hash-verified

3271 BLOCKSIZE_INDEX = None
3272
3273 def test_non_regular_file_src(self):
3274 with io.BytesIO(self.FILEDATA) as src:
3275 with open(TESTFN2, "wb") as dst:
3276 with self.assertRaises(_GiveupOnFastCopy):
3277 self.zerocopy_fun(src, dst)
3278 shutil.copyfileobj(src, dst)
3279
3280 self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA)
3281
3282 def test_non_regular_file_dst(self):
3283 with open(TESTFN, "rb") as src:

Callers

nothing calls this directly

Calls 5

read_fileFunction · 0.85
openFunction · 0.50
assertRaisesMethod · 0.45
zerocopy_funMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected