Created Dienstag 31 Dezember 2019
- Install
- Create tests directory in app directory as package (includes).
- Create configuration file pytest.ini in project directory with at least following content:
[pytest]
DJANGO_SETTINGS_MODULE = ITshelfs.settings
addopts = --cov --cov-report=html
DJANGO_SETTINGS_MODULE = ITshelfs.settings
addopts = --cov --cov-report=html
- Create test\conftest.py for fixtures.
- Add the following to .coveragerc:
[run]
omit =
omit =
*/tests/*
*/migrations/*
*manage.py
*admin.py
*wsgi.py
*/migrations/*
*manage.py
*admin.py
*wsgi.py
- Add the following to VCS ignore file (.hgignore, .gitignore):
- htmlcov/*
- .coverage