2020-10-14 08:03:51 +00:00
|
|
|
#
|
|
|
|
# http://doc.pytest.org/en/latest/customize.html#builtin-configuration-file-options
|
|
|
|
# https://pytest-django.readthedocs.io/en/latest/
|
|
|
|
|
|
|
|
[pytest]
|
2020-11-01 15:40:08 +00:00
|
|
|
DJANGO_SETTINGS_MODULE=inventory_project.settings.tests
|
2020-10-14 08:03:51 +00:00
|
|
|
testpaths =
|
2020-11-01 15:40:08 +00:00
|
|
|
inventory/tests/
|
|
|
|
inventory_project/tests/
|
2020-10-14 08:03:51 +00:00
|
|
|
|
|
|
|
# http://doc.pytest.org/en/latest/customize.html#confval-norecursedirs
|
|
|
|
norecursedirs = .* .git __pycache__ coverage* dist
|
|
|
|
addopts =
|
|
|
|
--reuse-db
|
|
|
|
--nomigrations
|
|
|
|
|
|
|
|
# coverage:
|
|
|
|
--cov=.
|
|
|
|
--cov-report term-missing
|
|
|
|
--cov-report html
|
|
|
|
--cov-report xml
|
|
|
|
--no-cov-on-fail
|
|
|
|
|
|
|
|
--showlocals
|
|
|
|
|
|
|
|
--doctest-modules
|
|
|
|
|
|
|
|
# run the last failures first:
|
|
|
|
--failed-first
|
|
|
|
|
|
|
|
# run all tests if no tests failed in the last run:
|
|
|
|
--last-failed-no-failures all
|
|
|
|
|
|
|
|
# sort new tests first:
|
|
|
|
--new-first
|
|
|
|
|
|
|
|
# randomly is sometimes helpfull, comment this:
|
|
|
|
-p no:randomly
|
|
|
|
|
|
|
|
# sometimes helpfull:
|
|
|
|
#-vv
|
|
|
|
#--verbose
|
|
|
|
#--capture=no
|
|
|
|
#--trace-config
|
|
|
|
#--full-trace
|
|
|
|
#-p no:warnings
|