-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpytest.ini
More file actions
50 lines (41 loc) · 1.68 KB
/
Copy pathpytest.ini
File metadata and controls
50 lines (41 loc) · 1.68 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
[pytest]
# Convert deprecation warnings into errors.
#
# Note:
# - Each line is a colon-separated string.
# - The first part is what to do with the warning - error or ignore.
# - The second part is a regex that must match the start of the warning message.
# - The third part is the warning class name.
# - The fourth part is a regex that must match the module triggering the error.
# - The order matters. Later rules take priority over earlier ones.
# Hence any rules ignoring deprecation warnings must be below the rule that converts
# DeprecationWarnings into errors.
filterwarnings =
error::ResourceWarning
error::RuntimeWarning
error::DeprecationWarning
error::pytest.PytestCollectionWarning
testpaths = tests
DJANGO_SETTINGS_MODULE = tests.settings
addopts =
# Show most detailed test results.
# https://docs.pytest.org/en/stable/how-to/output.html#verbosity
--verbosity=2
# Use short tracebacks.
# https://docs.pytest.org/en/stable/how-to/output.html#modifying-python-traceback-printing
--tb=short
# Capture all output written to STDOUT and STDERR.
# https://docs.pytest.org/en/stable/capture.html
--capture=fd
# Disallow unregistered pytest marks.
# https://docs.pytest.org/en/stable/reference/reference.html#confval-markers
--strict-markers
# Make plugins opt-in instead of opt-out.
# https://docs.pytest.org/en/stable/how-to/plugins.html#disabling-plugins-from-autoloading
--disable-plugin-autoload
# Django integration.
# https://pytest-django.readthedocs.io/
-p django
# Ensure passing xfailed (aka "xpass") tests cause the test suite to fail.
# https://docs.pytest.org/en/latest/skipping.html#strict-parameter
xfail_strict = true