pytest plugin to check source code with pylint
Run pylint with pytest and have configurable rule types (i.e. Convention, Warn, and Error) fail the build. You can also specify a pylintrc file.
would be the most simple usage and would run pylint for all error messages.
py.test --pylint --pylint-rcfile=/my/pyrc --pylint-error-types=EF --pylint-jobs=4
This would use the pylintrc file at /my/pyrc, only error on pylint Errors and Failures, and use 4 cores for running pylint.
You can restrict your test run to only perform pylint checks and not any other tests by typing:
py.test --pylint -m pylint
This code is heavily based on pytest-flakes
- jamur2 corrected issue where file paths where not being output properly on lint failures.
- Corrected a bug preventing this plugin from working with py.test >= 3.7.0.
- jwkvam added progress output during linting.
- Added option --no-pylint to override --pylint for cases when it’s turned on by default.
- jwkvam provided support for pylint 2.0
- noisecapella added an option to run pylint with multiple processes
- bdrung corrected inconsitent returns in a function
- Dropped Python 3.3 support
- Corrected path issue reported by Kargathia
- Linting is performed before tests which enables code duplication checks to work along with a performance boost, thanks to @heoga
Release history Release notifications
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_pylint-0.12.3-py2-none-any.whl (7.2 kB) Copy SHA256 hash SHA256||Wheel||py2|
|pytest_pylint-0.12.3-py3-none-any.whl (5.2 kB) Copy SHA256 hash SHA256||Wheel||py3|
|pytest-pylint-0.12.3.tar.gz (5.7 kB) Copy SHA256 hash SHA256||Source||None|