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

Method test_copy

Lib/test/test_codecs.py:3699–3708  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3697 self.assertEqual(sr.readline(), b'789\n')
3698
3699 def test_copy(self):
3700 bio = io.BytesIO()
3701 codec = codecs.lookup('ascii')
3702 sr = codecs.StreamRecoder(bio, codec.encode, codec.decode,
3703 encodings.ascii.StreamReader, encodings.ascii.StreamWriter)
3704
3705 with self.assertRaisesRegex(TypeError, 'StreamRecoder'):
3706 copy.copy(sr)
3707 with self.assertRaisesRegex(TypeError, 'StreamRecoder'):
3708 copy.deepcopy(sr)
3709
3710 def test_pickle(self):
3711 q = Queue(b'')

Callers

nothing calls this directly

Calls 3

assertRaisesRegexMethod · 0.80
lookupMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected