pypy/interpreter/test/test_zpy.py::test_pytrace_dis_bug
def test_pytrace_dis_bug():
output = run(sys.executable, pypypath, '-S',
stdin="__pytrace__ = 1\nfor i in range(1): i += 1\n")
output = output.replace('\r\n', '\n')
assert """\
\t<module>: LOAD_NAME 0 (range)
\t<module>: LOAD_CONST 0 (1)
\t<module>: CALL_FUNCTION 1
\t<module>: GET_ITER 0
\t<module>: FOR_ITER 6 (to 20)
\t<module>: STORE_NAME 1 (i)
\t<module>: LOAD_NAME 1 (i)
\t<module>: LOAD_CONST 0 (1)
\t<module>: INPLACE_ADD 0
\t<module>: STORE_NAME 1 (i)
\t<module>: JUMP_ABSOLUTE 4 (to 8)
\t<module>: FOR_ITER 6 (to 20)
\t<module>: LOAD_CONST 1 (None)
\t<module>: RETURN_VALUE 0
> """ in output
E assert '\t<module>: LOAD_NAME 0 (range)\n\t<module>: LOAD_CONST 0 (1)\n\t<module>: CALL_F... FOR_ITER 6 (to 20)\n\t<module>: LOAD_CONST 1 (None)\n\t<module>: RETURN_VALUE 0\n' in '>>>> Tracing enabled\n>>>> \t<module>: LOAD_NAME 0 (range)\n\t<module>: LOAD_CONST 0 (1)\n\... FOR_ITER 6 (to 20)\n\t<module>: LOAD_CONST 1 (None)\n\t<module>: RETURN_VALUE 0 \n>>>> '
interpreter/test/test_zpy.py:170: AssertionError
---------- Captured stdout call ----------
--- stdout ---
>>>> Tracing enabled
>>>> <module>: LOAD_NAME 0 (range)
<module>: LOAD_CONST 0 (1)
<module>: CALL_FUNCTION 1
<module>: GET_ITER 0
<module>: FOR_ITER 6 (to 20)
<module>: STORE_NAME 1 (i)
<module>: LOAD_NAME 1 (i)
<module>: LOAD_CONST 0 (1)
<module>: INPLACE_ADD 0
<module>: STORE_NAME 1 (i)
<module>: <153> 4
<module>: FOR_ITER 6 (to 20)
<module>: LOAD_CONST 1 (None)
<module>: RETURN_VALUE 0
>>>>
()
--- stderr ---
None
()
---------- Captured stderr call ----------
PyPy 7.3.24-alpha0 in StdObjSpace on top of Python 2.7.18 (startuptime: 10.06 secs)
builder: own-linux-x86-64 build #10877+
test: pypy/interpreter/test/test_zpy.py::test_pytrace_dis_bug