Pytest is a framework for testing Python code. Due to easy use, well-written documentation, and open-source It’s the most widely-used Python testing framework. To use Pytest you need to install it using pip. 

pip install -U pytest


Other frameworks for testing Python code:


Pros

Cons:



Official Pytest documentation: https://docs.pytest.org/en/6.2.x/contents.html