$npx skillfedfor your agent

pytest-mypy-plugins

pytest plugin for writing tests for mypy plugins

Worth itPyPI TestingReleased May 2026459.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_mypy_plugins-4.0.3-py3-none-any.whl
v4.0.3 · released 2026-05-14 · Python >=3.10 · 9 runtime deps: Jinja2, decorator, jsonschema, mypy, packaging, pytest, pyyaml, regex

Yes. This is a well-maintained, production-stable tool with low install friction and no known vulnerabilities. Install it if you maintain a mypy plugin, publish type stubs, or want to add type-safety regression tests to a typed library. The YAML-based test format is more readable and maintainable than writing pytest tests for type checking manually.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later and mypy to be installed (included as a runtime dependency).
  • Low friction install with a stable, actively maintained codebase.
  • Nine runtime dependencies are all widely used and well-established (pytest, mypy, pyyaml, jsonschema, Jinja2, decorator, packaging, regex, tomlkit), and the package itself is marked Production/Stable with recent activity.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

last release 2026-05-14 (92 days) · last repo commit 2026-07-21 · 126 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 459,503 downloads/mo, #6,541 on PyPI

Verify before relying

pip install pytest-mypy-plugins

# Create a test file (e.g., test_types.yml):
# - case: simple_type_check
#   main: |
#     x = 1
#     reveal_type(x)  # N: Revealed type is 'builtins.int'

pytest
  • Whether the plugin works with all mypy plugin types or only a subset
  • Performance characteristics when running large test suites with many YAML cases
  • Compatibility with recent mypy versions beyond what the dependency specification guarantees
Same gist for agents: .md · .json

What it is and what it does

pytest-mypy-plugins is a pytest plugin that lets you write type-checking tests in YAML format, asserting what types mypy infers for your code. Instead of manually running mypy and inspecting output, you define test cases with Python code snippets and expected type annotations inline, then run pytest to validate them. It supports both custom reveal_type matchers and standard typing.assert_type assertions, parametrized test cases, environment variables, and mypy configuration overrides.

The plugin is designed for testing mypy plugins themselves, type stubs, and type-annotated libraries. It handles subprocess isolation by default (running mypy in separate processes) and provides options for same-process debugging. Test cases are written declaratively in YAML with properties like main code, extra files, mypy config, environment variables, and skip/xfail conditions, making it easy to maintain a suite of type-safety regression tests without writing boilerplate Python test code.

Use it for

  • Testing a custom mypy plugin by defining type-checking scenarios in YAML and verifying mypy's behavior
  • Validating type stubs for a library by asserting inferred types match expectations across different code patterns
  • Regression testing type annotations in a typed library by running a suite of type assertions as part of CI
  • Debugging mypy behavior by using --mypy-same-process to inspect type inference in the same Python process
  • Parametrized type testing by running the same type assertion across multiple input values or configurations

Worth the install?

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

Worth it

Yes.

This is a well-maintained, production-stable tool with low install friction and no known vulnerabilities. Install it if you maintain a mypy plugin, publish type stubs, or want to add type-safety regression tests to a typed library. The YAML-based test format is more readable and maintainable than writing pytest tests for type checking manually.

Install

pytest-mypy-plugins on PyPI

Before you install

Low friction install with a stable, actively maintained codebase. Nine runtime dependencies are all widely used and well-established (pytest, mypy, pyyaml, jsonschema, Jinja2, decorator, packaging, regex, tomlkit), and the package itself is marked Production/Stable with recent activity.

Requires Python 3.10 or later and mypy to be installed (included as a runtime dependency).

License in practice

MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pytest-mypy-plugins

# Create a test file (e.g., test_types.yml):
# - case: simple_type_check
#   main: |
#     x = 1
#     reveal_type(x)  # N: Revealed type is 'builtins.int'

pytest

Verify before relying

  • Whether the plugin works with all mypy plugin types or only a subset
  • Performance characteristics when running large test suites with many YAML cases
  • Compatibility with recent mypy versions beyond what the dependency specification guarantees

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
Jinja2decoratorjsonschemamypypackagingpytestpyyamlregextomlkit
MaintenanceActively maintained 92 days since the last release
Last repo commit
First released
Downloads459,503 / month, #6,541 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Evidence: pytest_mypy_plugins-4.0.3-py3-none-any.whl

Tags

Capabilities
mypy type testing pluginpytest mypy integrationtype checking test frameworkmypy plugin testingyaml type assertion testing
Topics
type-checkingmypy-plugintesting-framework

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

  • pytest-mypy-pluginsA pytest plugin that runs type-checking tests against mypy by…
  • pytest-mypyIntegrates mypy static type checking into pytest, running type checks…
  • jsonschema-typed-v2Generates Python TypedDict type annotations automatically from JSON…

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-regex · django-types · re-assert · grpc-stubs · pytest-datadir · pytest-isort · pytest-env · django-stubs · assertpy · mypy-strict-kwargs