New issue 2560: Assert reinterpretation nonsense in app-tests
https://bitbucket.org/pypy/pypy/issues/2560/assert-reinterpretation-nonsense-in-app

Ronan Lamy:

On pypy3, when an assertion fails in an app-level test, the source code for the 
`assert` statement is passed on to pytest which compiles some bytecode that is 
run again by the interpreter in order to provide better error reporting. (BTW, 
this assert reinterpretation process has been abandoned by pytest for being too 
error-prone.)

The trouble is the compilation logic for this runs on the host Python (i.e. 
CPython2, typically), but the bytecode runs on top of an interpreted pypy3, so 
that `assert` statements that aren't bytecode-compatible between 2.7 and 3.5 
cause BytecodeCorruptions, or worse.

Thanks to bytecode compatibility between CPython and PyPy, pypy2 is not visibly 
affected, though this logic is arguably also faulty there.


_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to