$npx skillfedfor your agent

flake8-pytest-style

A flake8 plugin checking common style issues or inconsistencies with pytest-based tests.

Worth itPyPI TestingReleased Oct 2025201.4K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flake8_pytest_style-2.2.0-py3-none-any.whl
v2.2.0 · released 2025-10-20 · Python >=3.10 · 1 runtime deps: flake8-plugin-utils

Yes. If you use pytest and want automated style enforcement for test code, this plugin is worth installing. It has low install friction, active maintenance, no known vulnerabilities, and catches real mistakes that improve test reliability. The only caveat is that the license treatment is marked unclear in the metadata, though the description states MIT—verify the actual license before use in proprietary projects.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; flake8 must be installed and configured in your project.
  • Low friction installation with a single lightweight runtime dependency (flake8-plugin-utils).
  • Actively maintained with recent releases; last commit 2026-08-13 and version 2.2.0 released 2025-10-20.

License · maintenance · safety

(unclear)

last release 2025-10-20 (298 days) · last repo commit 2026-08-13 · 240 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 201,433 downloads/mo, #9,672 on PyPI

Verify before relying

pip install flake8-pytest-style

# Then run flake8 on your test files:
flake8 tests/

# The plugin automatically checks for issues like:
# PT001: @pytest.fixture over @pytest.fixture()
# PT009: regular assert instead of unittest-style assertions
  • Whether the license is actually MIT (description says 'MIT' but meta.license_spdx is null)
Same gist for agents: .md · .json

What it is and what it does

flake8-pytest-style is a flake8 plugin that integrates directly into your linting workflow to catch style and consistency issues specific to pytest test code. It reports over 30 distinct error codes (PT001–PT031) covering common mistakes like using @pytest.fixture() with unnecessary parentheses, overly broad exception matching in pytest.raises(), unittest-style assertions instead of pytest idioms, and fixture naming/return-value inconsistencies.

The plugin works as a flake8 extension, running automatically when you invoke flake8 on your test files. It is configurable via flake8 settings for several rules (fixture parentheses style, parametrize argument types, exception/warning matching requirements) and requires only one runtime dependency. It supports Python 3.10 through 3.14 and is actively maintained.

Use it for

  • Enforce consistent pytest fixture style across a team (e.g., @pytest.fixture vs @pytest.fixture()) via PT001/PT023.
  • Catch overly broad exception handlers in pytest.raises() that could mask unrelated errors (PT011).
  • Migrate from unittest-style assertions to pytest idioms automatically during code review (PT009/PT027).
  • Detect fixture naming mistakes and return-value inconsistencies that indicate bugs (PT004/PT005).
  • Validate parametrize decorators for correct argument types and duplicate test cases (PT006/PT007/PT014).
  • Identify deprecated pytest patterns like @pytest.yield_fixture and request.addfinalizer (PT020/PT021).

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

If you use pytest and want automated style enforcement for test code, this plugin is worth installing. It has low install friction, active maintenance, no known vulnerabilities, and catches real mistakes that improve test reliability. The only caveat is that the license treatment is marked unclear in the metadata, though the description states MIT—verify the actual license before use in proprietary projects.

Install

flake8-pytest-style on PyPI

Before you install

Low friction installation with a single lightweight runtime dependency (flake8-plugin-utils). Actively maintained with recent releases; last commit 2026-08-13 and version 2.2.0 released 2025-10-20. Requires Python 3.10 or later.

Requires Python 3.10 or later; flake8 must be installed and configured in your project.

Quickstart

pip install flake8-pytest-style

# Then run flake8 on your test files:
flake8 tests/

# The plugin automatically checks for issues like:
# PT001: @pytest.fixture over @pytest.fixture()
# PT009: regular assert instead of unittest-style assertions

Verify before relying

  • Whether the license is actually MIT (description says 'MIT' but meta.license_spdx is null)

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
flake8-plugin-utils
MaintenanceActively maintained 298 days since the last release
Last repo commit
First released
Downloads201,433 / month, #9,672 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: PluginsFramework :: Flake8Framework :: PytestIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: Unit

Evidence: flake8_pytest_style-2.2.0-py3-none-any.whl

Tags

Capabilities
flake8 pytest style checkerpytest fixture lintingpytest code qualitytest code style enforcementpytest best practices linterflake8 plugin testingpytest assertion checker
Topics
pytest-lintingtest-qualityflake8-plugin
PyPI keywords
flake8pytest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “flake8 pytest style checker”

  • flake8-pytest-styleA flake8 plugin that detects and reports style inconsistencies and…
  • pytest-flake8A pytest plugin that runs flake8 PEP8 compliance checks on Python…
  • flake8-blackA flake8 plugin that runs black's code style validation within the…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also flake8-return · pytest-examples · pytest-raises · wemake-python-styleguide · pylint-pytest · flake8-pie · flake8-print · flake8-noqa · pytest-mock · flake8-plugin-utils