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

Method test_pickle

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

Source from the content-addressed store, hash-verified

3721 copy.deepcopy(sr)
3722
3723 def test_pickle(self):
3724 q = Queue(b'')
3725 codec = codecs.lookup('ascii')
3726 sr = codecs.StreamRecoder(q, codec.encode, codec.decode,
3727 encodings.ascii.StreamReader, encodings.ascii.StreamWriter)
3728
3729 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
3730 with self.subTest(protocol=proto):
3731 with self.assertRaisesRegex(TypeError, 'StreamRecoder'):
3732 pickle.dumps(sr, proto)
3733
3734
3735@unittest.skipIf(_testinternalcapi is None, 'need _testinternalcapi module')

Callers

nothing calls this directly

Calls 5

subTestMethod · 0.80
assertRaisesRegexMethod · 0.80
QueueClass · 0.70
lookupMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected