$npx skillfedfor your agent

pytest-mypy

A Pytest Plugin for Mypy

Worth itPyPI TestingReleased Apr 2025557.3K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_mypy-1.0.1-py3-none-any.whl
v1.0.1 · released 2025-04-02 · Python >=3.8 · 3 runtime deps: filelock, mypy, pytest

Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a real workflow problem—integrating type checking into your existing pytest test runs. It's well-suited for teams that want type validation as a first-class part of their test suite rather than a separate tool invocation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires mypy and pytest to be installed; mypy configuration can be read from mypy.ini or set programmatically via conftest.py.
  • Low friction install with three straightforward runtime dependencies (pytest, mypy, filelock).
  • The package is actively maintained with recent commits and has been stable since its early releases.

License · maintenance · safety

permissive license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2025-04-02 (499 days) · last repo commit 2026-06-13 · 256 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 557,278 downloads/mo, #6,011 on PyPI

Verify before relying

pip install pytest-mypy

py.test --mypy test_*.py

# Or configure in conftest.py:
def pytest_configure(config):
    plugin = config.pluginmanager.getplugin('mypy')
    plugin.mypy_argv.append('--check-untyped-defs')
  • Whether the plugin supports all mypy configuration options or only a subset
  • Performance impact when running type checks on large codebases during test execution
Same gist for agents: .md · .json

What it is and what it does

pytest-mypy is a pytest plugin that runs mypy's static type checker on your source files as part of your normal pytest test runs. Instead of running type checks separately, you invoke mypy checks through pytest using the --mypy flag, making type validation part of your continuous test workflow.

The plugin works by integrating mypy into pytest's test discovery and execution, similar to how pytest-flake8 integrates flake8. You can configure mypy behavior through a mypy.ini file or programmatically in conftest.py, and you can filter test runs to only perform type checks using pytest's -m option. It depends on pytest, mypy, and filelock, all of which are common tools in Python development environments.

Use it for

  • Run type checks automatically as part of your CI/CD pipeline without a separate mypy invocation step.
  • Enforce type checking discipline in test suites by failing the build when type errors are detected.
  • Configure mypy options per-project in conftest.py to apply custom type-checking rules during test runs.
  • Restrict test execution to only type checks using pytest markers when you want to validate types without running functional tests.

Worth the install?

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

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a real workflow problem—integrating type checking into your existing pytest test runs. It's well-suited for teams that want type validation as a first-class part of their test suite rather than a separate tool invocation.

Install

pytest-mypy on PyPI

Before you install

Low friction install with three straightforward runtime dependencies (pytest, mypy, filelock). The package is actively maintained with recent commits and has been stable since its early releases.

Requires mypy and pytest to be installed; mypy configuration can be read from mypy.ini or set programmatically via conftest.py.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install pytest-mypy

py.test --mypy test_*.py

# Or configure in conftest.py:
def pytest_configure(config):
    plugin = config.pluginmanager.getplugin('mypy')
    plugin.mypy_argv.append('--check-untyped-defs')

Verify before relying

  • Whether the plugin supports all mypy configuration options or only a subset
  • Performance impact when running type checks on large codebases during test execution

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
filelockmypypytest
MaintenanceActively maintained 499 days since the last release
Last repo commit
First released
Downloads557,278 / month, #6,011 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Testing

Evidence: pytest_mypy-1.0.1-py3-none-any.whl

Tags

Capabilities
pytest mypy pluginstatic type checking pytestmypy integration testingtype checking in test runspytest type checkermypy pytest integration
Topics
type-checkingpytest-pluginci-integration

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 › “pytest mypy plugin”

  • pytest-mypyIntegrates mypy static type checking into pytest, running type checks…
  • pytest-mypy-pluginsA pytest plugin that runs type-checking tests against mypy by…
  • pytest-enablerA pytest plugin that conditionally enables other pytest plugins based…

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 pytest-flake8 · pytest-logger · pytest-datadir · mypy · pytest-logging · pytest-enabler · pytest-astropy-header · pytest-test-groups · pytest-progress · pytest-metadata