Pytest plugin to run your tests with beartype checking enabled.
Project Links
Meta
Author: Tushar Sadhwani
Requires Python: >=3.8
Classifiers
Framework
- Pytest
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3 :: Only
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: Implementation :: CPython
Typing
- Typed
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'
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 -r requirements-dev.txtto do an editable install - Run
pytestto run tests
Type Checking
Run mypy .
Create and upload a package to PyPI
Make sure to bump the version in setup.cfg.
Then run the following commands:
rm -rf build dist
python setup.py sdist bdist_wheel
Then upload it to PyPI using twine:
twine upload dist/*