Python Unit Testing Installing pytest $ pip install -U pytest For Python 3 use the command $ pip3 install -U pytest Checking pytest version $ pytest --version Running your test $ pytest -q test.py