-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
52 lines (40 loc) · 1.75 KB
/
pytest.ini
File metadata and controls
52 lines (40 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[pytest]
DJANGO_SETTINGS_MODULE = django_project.settings
python_files = tests.py test_*.py *_tests.py test_*.tavern.yaml
norecursedirs = assets tests_fixtures
env =
STAGE = TEST
ENVIRONMENT_NAME = test
xfail_strict=true
;The PYTEST_TIMEOUT environment variable sets a global timeout overriding a possible value in the configuration file.
; timeout applied to each test by default if they don't have @pytest.mark.timeout(60)
timeout = 300
# opts for ci:
# addopts =
#
# -s: disables all capturing (so you can see prints, stdout, stderr...)
# take into account that you can always see prints of failed functions
# --durations=10: get the 10 slowest tests
# --nf: new first
# --ff: failed first
# -x, --exitfirst exit instantly on first error or failed test.
# --reuse-db: don't recreate db (make sure all fixtures yield and then delete the objects, so you have a "clean" DB
# -n "number of cpus to use" (needs pytest-xdist)
# --strict marks not registered in configuration file raise
# errors.
# --runxfail run tests even if they are marked xfail
#
# --cov-report html:pytest_coverage_report exports cov report on html to directory pytest_coverage_report
# this should be common for local and CI/CD
addopts = --ff -x --showlocals --durations=10 --strict --doctest-modules --no-cov-on-fail --cov=.
# optimal options for run on a clean and nice terminal output:
;addopts = --quiet --color=yes --show-capture=no --no-print-logs --disable-warnings --reuse-db --showlocals --ff --strict
# only functional:
;addopts = --reuse-db --showlocals -x --ff --durations=10 --strict -m functional -m webtest --driver Chrome --headless
markers =
functional
webtest
integration
timeout
django_db
smoketest