(self)
| 99 | ]) |
| 100 | |
| 101 | def test_from_file(self): |
| 102 | f = io.BytesIO(b'prefix(I123\nK\x12J\x12\x34\x56\x78t.suffix') |
| 103 | self.assertEqual(f.read(6), b'prefix') |
| 104 | it = pickletools.genops(f) |
| 105 | self.assertEqual([(item[0].name,) + item[1:] for item in it], [ |
| 106 | ('MARK', None, 6), |
| 107 | ('INT', 123, 7), |
| 108 | ('BININT1', 0x12, 12), |
| 109 | ('BININT', 0x78563412, 14), |
| 110 | ('TUPLE', None, 19), |
| 111 | ('STOP', None, 20), |
| 112 | ]) |
| 113 | self.assertEqual(f.read(), b'suffix') |
| 114 | |
| 115 | def test_without_pos(self): |
| 116 | f = SimpleReader(b'(I123\nK\x12J\x12\x34\x56\x78t.') |
nothing calls this directly
no test coverage detected