py.test plugin to remove stale byte code files.
py.test plugin to remove stale bytecode
This plug-in no longer works since py.test 3.10. See change log for details.
The discussion at pytest#4969 might also be interesting.
This plugin removes all stale bytecode files before running tests. This makes sure that Python modules – whose source was deleted – are not accidentally visible to the test runner anymore due to a left-over bytecode file (*.pyc, *.pyo).
To use this plugin you just have to install it, so it is accessible by the pytest you are using:
- If you are using buildout, add pytest-remove-stale-bytecode to the buildout section of your pytest runner.
- If you are using pip add it to your test requirements.
Per default, there is no output generated, but if pytest is invoked in verbose mode (-v), information about the deleted files is printed.
This plugin was inspired by a feature of zope.testrunner.
- This plug-in only works in py.test < version 3.10. It is broken since the merge of pytest-dev/pytest#4250
- Drop support for Python 3.3.
- Add support for Python 3.6, PyPy2 and PyPy3.
- Do not show output by default anymore. It can be turned on with -v option.
- Change the license from ZPL to MIT.
- Also remove bytecode files under Python 3, that end with -PYTEST.
- Add support for removing byte code files under Python 3.
- initial release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|pytest_remove_stale_bytecode-3.0.1-py2.py3-none-any.whl (5.1 kB) Copy SHA256 hash SHA256||Wheel||py2.py3|
|pytest-remove-stale-bytecode-3.0.1.tar.gz (4.8 kB) Copy SHA256 hash SHA256||Source||None|