py.test plugin to remove stale byte code files.
Project description
py.test plugin to remove stale bytecode
CAUTION
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.
Description
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).
Usage
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.
CHANGES
3.0.1 (2019-03-21)
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.
3.0 (2017-05-12)
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.
2.1 (2015-10-01)
Also remove bytecode files under Python 3, that end with -PYTEST.
2.0 (2015-10-01)
Add support for removing byte code files under Python 3.
1.0 (2014-10-29)
initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest-remove-stale-bytecode-3.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8bf25bfe3c8ec0633301b798ac50f2d365e14e9ef2e512308044e0cc0a1e55e |
|
MD5 | f4f1555ffbb53729401412ab540dee1d |
|
BLAKE2b-256 | 4b5e11007162d6ddbcce765f2bb9fcdc455c72e1aee49f1de5f4348249a8c43c |
Hashes for pytest_remove_stale_bytecode-3.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9955d38479e20de5bcce04dcb388a13aae67255424dc5924bfde1f81233742b9 |
|
MD5 | f52367e6cdaa42390ceaad423690d779 |
|
BLAKE2b-256 | 10e0886fd369731fb6bc0b1af4df681e67aabc52b51f5ca2468a20662d506fd7 |