mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23094: Fixed readline with frames in Python implementation of pickle.
This commit is contained in:
commit
230586739c
3 changed files with 11 additions and 1 deletions
|
@ -1584,6 +1584,14 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
count_opcode(pickle.FRAME, pickled))
|
||||
self.assertEqual(obj, self.loads(some_frames_pickle))
|
||||
|
||||
def test_frame_readline(self):
|
||||
pickled = b'\x80\x04\x95\x05\x00\x00\x00\x00\x00\x00\x00I42\n.'
|
||||
# 0: \x80 PROTO 4
|
||||
# 2: \x95 FRAME 5
|
||||
# 11: I INT 42
|
||||
# 15: . STOP
|
||||
self.assertEqual(self.loads(pickled), 42)
|
||||
|
||||
def test_nested_names(self):
|
||||
global Nested
|
||||
class Nested:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue