{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/3"}],"enrichment":{"capability":"A pytest plugin that runs type-checking tests against mypy by defining test cases in YAML files with inline type assertions and custom matchers.","skillfed_tags":["type-checking","mypy-plugin","testing-framework"],"use_cases":["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"],"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.\n\nThe 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.","worth_installing":"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."},"id":"pytest-mypy-plugins","links":{"html":"https://skillfed.io/packages/pytest-mypy-plugins","md":"https://skillfed.io/packages/pytest-mypy-plugins.md","pypi":"https://pypi.org/project/pytest-mypy-plugins/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-14","license_spdx":null,"license_treatment":"permissive","name":"pytest-mypy-plugins","python_support":"supports_current","summary":"pytest plugin for writing tests for mypy plugins"},"popularity":{"monthly_downloads":459503,"position":6541,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.0.3"}
