-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Remove stale bytecode files #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Original comment by Michael Howitz (BitBucket: icemac, GitHub: icemac): We developed a plug-in which removes stale byte code files: https://pypi.python.org/pypi/pytest-remove-stale-bytecode So the ticket an be considered as solved. |
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): So far i didn't see it as a core responsibility of a testing tool to clean up pyc files. Personally i use |
Original comment by BitBucket: faassen, GitHub: faassen: The argument for making it the responsibility of the test runner is because it can lead to correctly written tests passing that shouldn't be failing, without warning. It's tripped me up quite a few times after I started using py.test and it never did with the zope test runner. It sometimes takes a little bit of time to realize what is going on, sometimes after pushing the code, and sometimes until I check out the code again. It's never a huge deal, but it just happened to come up again (in the context of nose, actually) and I figured this time I'd say something. Just that little bit of extra usability that I've come to expect from py.test. A warning would be an alternative: "this test only works because there's a .pyc file without .py file". Or maybe "stale .pyc files detected". |
Originally reported by: Wolfgang Schnerring (BitBucket: wosc, GitHub: wosc)
The situation is rather rare (when switching between branches for example) that you get obsolete .pyc/.pyo files, i.e. without corresponding .py files, but when it occurs it can lead to obscure and really hard to detect problems. So it might be a worthwile feature to clean those up automatically (zope.testrunner does this for example).
The text was updated successfully, but these errors were encountered: