skillfed

pytest-pylint

pytest plugin to check source code with pylint

pytest-pylint v0.21.0 616.4K downloads/30d#5,741 on PyPI76
Permissive license MIT DORMANT released

What it is and what it does

pytest-pylint is a pytest plugin that runs pylint static analysis checks as part of your test suite. Instead of running pylint separately, you invoke it through pytest with the `--pylint` flag, and it lints your source code according to your pylintrc configuration. You can choose which pylint message types (Errors, Failures, Warnings, Conventions) cause the test to fail, run linting in parallel across multiple cores, and optionally output results to a file. The plugin caches successful lint checks to speed up reruns when files haven't changed.

The package depends on pytest, pylint, and tomli (for TOML configuration support). It's designed for teams that want linting feedback integrated into their continuous test workflow rather than as a separate CI step, and it supports regex-based ignore patterns and smart pylintrc discovery.

Use it for:

  • Enforce code quality gates in CI/CD by failing the build on pylint errors or warnings during test runs.
  • Run linting checks in parallel across multiple CPU cores to speed up large codebases.
  • Restrict test execution to only pylint checks (skipping unit tests) with `py.test --pylint -m pylint`.
  • Cache lint results between test reruns to avoid re-linting unchanged files.
  • Integrate custom pylintrc files and ignore patterns into your pytest workflow without separate configuration.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates pylint code analysis into pytest, allowing you to run linting checks as part of your test suite and configure which rule types (errors, warnings, conventions) cause test failures.

Yes, if you want linting integrated into pytest and your project targets Python 3.8–3.12 with pytest >= 7.0 and pylint >= 2.15. The plugin is stable and low-friction to install, but dormant maintenance means it won't receive updates for new pytest or pylint versions—verify compatibility with your specific versions before relying on it in new projects.

Install

pytest-pylint on PyPI

pip

pip install pytest-pylint

uv

uv add pytest-pylint

poetry

poetry add pytest-pylint

Installing pytest-pylint

Before you install

Low friction install with three straightforward runtime dependencies. Maintenance is dormant—last release was over a year ago—but the package is marked Production/Stable and supports current Python versions. No recent activity suggests the plugin works as-is for its scope.

License in practice

MIT license is permissive; you can use, modify, and distribute this plugin freely with minimal restrictions, making it suitable for both open-source and proprietary projects.

Quickstart

pip install pytest-pylint

# In your test run:
py.test --pylint

# Or with options:
py.test --pylint --pylint-rcfile=/path/to/.pylintrc --pylint-error-types=EF

Requires pylint >= 2.15 and pytest >= 7.0; Python >= 3.7 required.

Verify before relying

  • Whether the plugin works correctly with pytest 8.0+ (description notes it 'should work' but lacks confirmation).
  • Current status of any compatibility issues with the latest pylint releases beyond 2.15.
  • Practical experience with the plugin on Python 3.12 in production environments.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — pytest, pylint, tomli
Maintenance dormant — 1,043 days since the last release
Last repo commit
First released
Downloads 616,413/month — #5,741 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_pylint-0.21.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

pytest pylint integrationrun pylint with pytestcode linting in test suitepylint test pluginstatic code analysis pytestpylint error checkinglint tests fail build
pytest-plugincode-qualitylinting

More Quality Assurance packages