Skip to main content

pytest plugin to check source code with pylint

Project description

https://img.shields.io/travis/carsongee/pytest-pylint.svg https://img.shields.io/coveralls/carsongee/pytest-pylint.svg https://img.shields.io/pypi/v/pytest-pylint.svg https://anaconda.org/conda-forge/pytest-pylint/badges/version.svg https://anaconda.org/conda-forge/pytest-pylint/badges/downloads.svg https://img.shields.io/pypi/l/pytest-pylint.svg

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.

Sample Usage

py.test --pylint

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

Acknowledgements

This code is heavily based on pytest-flakes

Releases

0.9.0

  • noisecapella added an option to run pylint with multiple processes

0.8.0

  • bdrung corrected inconsitent returns in a function

  • Dropped Python 3.3 support

0.7.1

0.7.0

  • Linting is performed before tests which enables code duplication checks to work along with a performance boost, thanks to @heoga

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

pytest-pylint-0.9.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distributions

pytest_pylint-0.9.0-py2.py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 2 Python 3

pytest_pylint-0.9.0-py2.7.egg (8.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page