Skip to content

beartype/pytest-beartype

Repository files navigation

pytest-beartype

Pytest plugin to run your tests with beartype checking enabled.

Installation

pip install pytest_beartype

Usage

pytest --beartype-packages='your_package_name,other_package_name'

or, with a single package:

pytest --beartype-packages=your_package_name

or, against all the packages ever mentioned in your code:

pytest --beartype-packages='*'

This will ensure that any type annotations in those packages are checked at runtime, while your tests are running.

Local Development / Testing

  • Create and activate a virtual environment
  • Run pip install -e .[dev] to do an editable install
  • Run pytest to run tests
  • Run tox to run tests for each Python version supported. This is ran as part of GitHub Actions.

Type Checking

Run mypy .

About

A pytest plugin to automatically run `beartype` on your test cases.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages