Supersimple examples how to write unit tests in Python
- pipenv (package manager recommended by Python Packaging Authority) installed
$ pip3 install --user pipenv
- virtual environment activated
$ pipenv shell
- packages installed
$ pipenv install -d
$ python3 -m unittest
Run tests with coverage
$ coverage run -m unittest
Display coverage
$ coverage report
or export to HTML (contains lines annotated by colors)
$ coverage html