Practice writing and executing automated tests for your Python applications.
To setup these examples, create a new directory on your Desktop called "testing-123" and navigate there from your command line:
cd Desktop
mkdir testing-123
cd testing-123/
If you haven't already, you will need to install the pytest
package, using either Pip or Pipenv, whichever works for you:
# For Pipenv users (Mac or Windows), run from a project's root directory:
pipenv install pytest --dev
# For Homebrew-installed Python 3.x on Mac OS:
pip3 install pytest
# All others:
pip install pytest
Follow along with the two examples from the pytest
package notes.