Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 599 Bytes

File metadata and controls

41 lines (32 loc) · 599 Bytes

python-unittests

Supersimple examples how to write unit tests in Python

Pre-requisites

  1. pipenv (package manager recommended by Python Packaging Authority) installed
$ pip3 install --user pipenv
  1. virtual environment activated
$ pipenv shell
  1. packages installed
$ pipenv install -d

How to run the tests

$ python3 -m unittest

Coverage

Run tests with coverage

$ coverage run -m unittest

Display coverage

$ coverage report

or export to HTML (contains lines annotated by colors)

$ coverage html