pip install -r requirements.txt
python -m unittest -v
pytest .
coverage
andpytest-cov
packages are required- Add
pragma: no cover
to exclude code from coverage report
Terminal report:
pytest --cov-report term-missing --cov .
HTML report:
pytest --cov-report html --cov .
To generate report:
python -m coverage run -m unittest
To view report in terminal:
python -m coverage report
To view report in HTML:
python -m coverage html