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.14.0

  • Added support for Pylint’s ignore-patterns for regex based ignores thanks to khokhlin

  • pytest-pylint now caches successful pylint checks to speedup test reruns when files haven’t changed thanks to yanqd0

0.13.0

  • Python 3.7 compatibility verified

  • Ignore paths no longer match partial names thanks to heoga

0.12.3

  • jamur2 corrected issue where file paths where not being output properly on lint failures.

0.12.2

  • Resolved issue where failing files weren’t reported thanks to reports from skirpichev and jamur2

0.12.1

  • Corrected a bug preventing this plugin from working with py.test >= 3.7.0.

0.12.0

  • jwkvam added progress output during linting.

0.11.0

  • Added option --no-pylint to override --pylint for cases when it’s turned on by default.

0.10.0

  • jwkvam provided support for pylint 2.0

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.14.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distributions

pytest_pylint-0.14.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

pytest_pylint-0.14.0-py2-none-any.whl (6.7 kB view details)

Uploaded Python 2

File details

Details for the file pytest-pylint-0.14.0.tar.gz.

File metadata

  • Download URL: pytest-pylint-0.14.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for pytest-pylint-0.14.0.tar.gz
Algorithm Hash digest
SHA256 7bfbb66fc6dc160193a9e813a7c55e5ae32028f18660deeb90e1cb7e980cbbac
MD5 4fb8bd66a415c8b2a61abc37c2ef0a87
BLAKE2b-256 5258cc27a07b8a7715411415c0f42d9e7c24bd2c646748b7406d2e7507da085f

See more details on using hashes here.

Provenance

File details

Details for the file pytest_pylint-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_pylint-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for pytest_pylint-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45d2209b65989c8981289c8e75d0fde8c55e87cef27e97facb49f14773a8d3fb
MD5 c47d7e9251e22d19632bdc3a04b162f9
BLAKE2b-256 48b1b9b5e20e6687cfaa334d0e8e63b6d57115415d6368b7f5a441a8f600fad4

See more details on using hashes here.

Provenance

File details

Details for the file pytest_pylint-0.14.0-py2-none-any.whl.

File metadata

  • Download URL: pytest_pylint-0.14.0-py2-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for pytest_pylint-0.14.0-py2-none-any.whl
Algorithm Hash digest
SHA256 0dcb6cd429281f7493994e65324937bb295ef28f7632c046b45828380f4fe88a
MD5 ff4df84c82df124b4023cffa42e6f5da
BLAKE2b-256 44b72b059de30ed0899d8e8d3e6423573319fd82df731aadcbe79eb287907eab

See more details on using hashes here.

Provenance

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