pytest¶
pytest is an alternative to Python’s Unittest module that simplifies testing even further.
Features¶
More detailed information about failed
assert
statementsAutomatic detection of test modules and functions
Modular fixtures for the management of small or parameterised, long-lived test resources
Can also execute unit tests without presets
Extensive plug-in architecture, with over 800 external plug-ins
Installation¶
You can install pytest in virtual environments <venv> with:
$ python -m pip install pytest
Collecting pytest
…
Successfully installed attrs-21.2.0 iniconfig-1.1.1 pluggy-1.0.0 py-1.10.0 pytest-6.2.5 toml-0.10.2
C:> python -m pip install pytest
Collecting pytest
…
Successfully installed attrs-21.2.0 iniconfig-1.1.1 pluggy-1.0.0 py-1.10.0 pytest-6.2.5 toml-0.10.2