[Pytest-commit] Issue #743: Assert rewrite causes reload() to fail (pytest-dev/pytest)
lcampagn
issues-reply at bitbucket.org
Thu May 14 04:04:26 CEST 2015
New issue 743: Assert rewrite causes reload() to fail
https://bitbucket.org/pytest-dev/pytest/issue/743/assert-rewrite-causes-reload-to-fail
lcampagn:
I have a unit test that passes when run with assert=plain or reinterp, but fails with rewrite. I also looked over #435, but I believe this is a separate issue. The offending test is attached. It works by writing a module to be imported, then re-writing, reloading it, and testing that the reload worked as expected.
I imagine there might be no sane way to fix this bug. If that is the case, then is there a way to disable assertion rewriting on a per-module basis? I was a bit surprised to find that adding messages to the assert statements did not fix the problem.
More information about the pytest-commit
mailing list