skip to navigation
skip to content

pytest-mypy 0.3.0

Mypy static type checker plugin for Pytest

Mypy static type checker plugin for Pytest


  • Runs the mypy static type checker on your source files as part of your Pytest test runs.
  • Does for mypy what the pytest-flake8 plugin does for flake8.
  • This is a work in progress – pull requests appreciated.


You can install “pytest-mypy” via pip from PyPI:

$ pip install pytest-mypy


You can enable pytest-mypy with the --mypy flag:

$ py.test --mypy test_*.py

Mypy supports reading configuration settings from a mypy.ini file. This is currently the only way to configure mypy through pytest-mypy. In the future pytest-mypy may offer a passthrough for command line options.


Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

Development Environment Setup

Here’s how to install pytest-mypy in development mode so you can test your changes locally:

$ pyvenv venv
$ source venv/bin/activate
$ python develop
$ venv/bin/py.test --mypy

How to publish a new version to PyPI

$ pip install twine wheel
$ python sdist bdist_wheel
$ twine upload dist/*


Distributed under the terms of the MIT license, “pytest-mypy” is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

File Type Py Version Uploaded on Size
pytest-mypy-0.3.0.tar.gz (md5) Source 2017-04-25 4KB
pytest_mypy-0.3.0-py3-none-any.whl (md5) Python Wheel py3 2017-04-25 5KB