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

Method test_annotate

Lib/test/test_pickletools.py:358–390  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

356''', r'stack not empty after STOP: \[list\]')
357
358 def test_annotate(self):
359 self.check_dis(b'(Nt.', '''\
360 0: ( MARK Push markobject onto the stack.
361 1: N NONE Push None on the stack.
362 2: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject.
363 3: . STOP Stop the unpickling machine.
364highest protocol among opcodes = 0
365''', annotate=1)
366 self.check_dis(b'(Nt.', '''\
367 0: ( MARK Push markobject onto the stack.
368 1: N NONE Push None on the stack.
369 2: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject.
370 3: . STOP Stop the unpickling machine.
371highest protocol among opcodes = 0
372''', annotate=20)
373 self.check_dis(b'(((((((ttttttt.', '''\
374 0: ( MARK Push markobject onto the stack.
375 1: ( MARK Push markobject onto the stack.
376 2: ( MARK Push markobject onto the stack.
377 3: ( MARK Push markobject onto the stack.
378 4: ( MARK Push markobject onto the stack.
379 5: ( MARK Push markobject onto the stack.
380 6: ( MARK Push markobject onto the stack.
381 7: t TUPLE (MARK at 6) Build a tuple out of the topmost stack slice, after markobject.
382 8: t TUPLE (MARK at 5) Build a tuple out of the topmost stack slice, after markobject.
383 9: t TUPLE (MARK at 4) Build a tuple out of the topmost stack slice, after markobject.
384 10: t TUPLE (MARK at 3) Build a tuple out of the topmost stack slice, after markobject.
385 11: t TUPLE (MARK at 2) Build a tuple out of the topmost stack slice, after markobject.
386 12: t TUPLE (MARK at 1) Build a tuple out of the topmost stack slice, after markobject.
387 13: t TUPLE (MARK at 0) Build a tuple out of the topmost stack slice, after markobject.
388 14: . STOP Stop the unpickling machine.
389highest protocol among opcodes = 0
390''', annotate=20)
391
392 def test_string(self):
393 self.check_dis(b"S'abc'\n.", '''\

Callers

nothing calls this directly

Calls 1

check_disMethod · 0.95

Tested by

no test coverage detected