The pytest framework is a standalone framework that comes as a separate library outside of standardized Python distribution. Before we can start writing tests using the pytest, we need to install pytest. Getting pytest installed is not a big task, and can be done easily by running the following command:
pip install pytest
Now, before we start writing tests for our application, let's first create a new directory named tests under our application directory and at the same level as where our run.py resides, to store these test cases by running the following command:
mkdir -p bugzot/tests
Now, it's time to write our first test with pytest.