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

Method test_non_regular_file_dst

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

Source from the content-addressed store, hash-verified

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:
3284 with io.BytesIO() as dst:
3285 with self.assertRaises(_GiveupOnFastCopy):
3286 self.zerocopy_fun(src, dst)
3287 shutil.copyfileobj(src, dst)
3288 dst.seek(0)
3289 self.assertEqual(dst.read(), self.FILEDATA)
3290
3291 def test_exception_on_second_call(self):
3292 def syscall(*args, **kwargs):

Callers

nothing calls this directly

Calls 6

openFunction · 0.50
assertRaisesMethod · 0.45
zerocopy_funMethod · 0.45
seekMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected