[Pytest-commit] Issue #576: Random test failures on windows after editing a python file (hpk42/pytest)
pombredanne
issues-reply at bitbucket.org
Mon Sep 1 22:47:13 CEST 2014
New issue 576: Random test failures on windows after editing a python file
https://bitbucket.org/hpk42/pytest/issue/576/random-test-failures-on-windows-after
pombredanne:
I get random failures on windows only (not on mac and not on linux) with win7 and Python 2.7.8 and py.test 2.6.1.
This heisenbug occurs some times after editing a file and running py.test.
Somehow, I found that the previous version of the code was executed, not the one saved.
Clearing the __pycache__ solved the issue each time.
I reckon that I could disable bytecode creation (as per #200 )
However why should I need to worry about a special python flag or env var just for py.test?
Note: the issue could be due to poor filesystem timestamps resolution on windows when files are updated.
Could it make sense to have a flag disable caching? or only enable caching with a command flag?
More information about the pytest-commit
mailing list