| 332 | ''', r'stack not empty after STOP: \[list\]') |
| 333 | |
| 334 | def test_annotate(self): |
| 335 | self.check_dis(b'(Nt.', '''\ |
| 336 | 0: ( MARK Push markobject onto the stack. |
| 337 | 1: N NONE Push None on the stack. |
| 338 | 2: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject. |
| 339 | 3: . STOP Stop the unpickling machine. |
| 340 | highest protocol among opcodes = 0 |
| 341 | ''', annotate=1) |
| 342 | self.check_dis(b'(Nt.', '''\ |
| 343 | 0: ( MARK Push markobject onto the stack. |
| 344 | 1: N NONE Push None on the stack. |
| 345 | 2: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject. |
| 346 | 3: . STOP Stop the unpickling machine. |
| 347 | highest protocol among opcodes = 0 |
| 348 | ''', annotate=20) |
| 349 | self.check_dis(b'(((((((ttttttt.', '''\ |
| 350 | 0: ( MARK Push markobject onto the stack. |
| 351 | 1: ( MARK Push markobject onto the stack. |
| 352 | 2: ( MARK Push markobject onto the stack. |
| 353 | 3: ( MARK Push markobject onto the stack. |
| 354 | 4: ( MARK Push markobject onto the stack. |
| 355 | 5: ( MARK Push markobject onto the stack. |
| 356 | 6: ( MARK Push markobject onto the stack. |
| 357 | 7: t TUPLE (MARK at 6) Build a tuple out of the topmost stack slice, after markobject. |
| 358 | 8: t TUPLE (MARK at 5) Build a tuple out of the topmost stack slice, after markobject. |
| 359 | 9: t TUPLE (MARK at 4) Build a tuple out of the topmost stack slice, after markobject. |
| 360 | 10: t TUPLE (MARK at 3) Build a tuple out of the topmost stack slice, after markobject. |
| 361 | 11: t TUPLE (MARK at 2) Build a tuple out of the topmost stack slice, after markobject. |
| 362 | 12: t TUPLE (MARK at 1) Build a tuple out of the topmost stack slice, after markobject. |
| 363 | 13: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject. |
| 364 | 14: . STOP Stop the unpickling machine. |
| 365 | highest protocol among opcodes = 0 |
| 366 | ''', annotate=20) |
| 367 | |
| 368 | def test_string(self): |
| 369 | self.check_dis(b"S'abc'\n.", '''\ |