The pytest Package
Last updated
Was this helpful?
Last updated
Was this helpful?
Prerequisite:
Reference:
If you are using Pip to manage software packages (recommended), install Pytest, as necessary:
Otherwise, if you are using Pipenv, you will want to first navigate inside your repository's root directory before installing Pytest:
Example invocations:
The Pytest package can be imported to facilitate assertions that errors will be raised:
The Pytest package can be imported to facilitate the construction of test fixtures (for example, to be placed in the "conftest.py" file):
The Pytest package is generally used as a command-line utility for running pre-defined files of "test" code. Follow the to get acclimated with Pytest.