[pytest] addopts = # `pytest-xdist`: --numprocesses=auto # NOTE: the plugin disabled because it's slower with so few tests --numprocesses=0 # Show 10 slowest invocations: --durations=10 # A bit of verbosity doesn't hurt: -v # Report all the things == -rxXs: -ra # Show values of the local vars in errors/tracebacks: --showlocals # Autocollect and invoke the doctests from all modules: # https://docs.pytest.org/en/stable/doctest.html --doctest-modules # Dump the test results in junit format: --junitxml=.test-results/pytest/results.xml # `pytest-cov`: --cov --cov=sphinxcontrib.towncrier --cov=tests/ --cov-report term-missing:skip-covered --cov-report xml:.test-results/pytest/cov.xml # Pre-load `pytest-cov` plugin early: -p pytest_cov # Fail on config parsing warnings: # --strict-config # Fail on non-existing markers: # * Deprecated since v6.2.0 but may be reintroduced later covering a # broader scope: # --strict # * Exists since v4.5.0 (advised to be used instead of `--strict`): --strict-markers doctest_optionflags = ALLOW_UNICODE ELLIPSIS # Marks tests with an empty parameterset as xfail(run=False) empty_parameter_set_mark = xfail faulthandler_timeout = 30 filterwarnings = error # FIXME: drop this once `pytest-cov` is updated. # Ref: https://github.com/pytest-dev/pytest-cov/issues/557 ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning # FIXME: drop this once `towncrier < 19.9.0` is no longer supported. ignore:Deprecated call to `pkg_resources.declare_namespace.'sphinxcontrib'.`.:DeprecationWarning # FIXME: drop this once `towncrier < 19.9.0` is no longer supported. ignore:pkg_resources is deprecated as an API:DeprecationWarning # https://docs.pytest.org/en/stable/usage.html#creating-junitxml-format-files junit_duration_report = call # xunit1 contains more metadata than xunit2 so it's better for CI UIs: junit_family = xunit1 junit_logging = all junit_log_passing_tests = true junit_suite_name = towncrier_test_suite # A mapping of markers to their descriptions allowed in strict mode: markers = minversion = 6.1.0 # Optimize pytest's lookup by restricting potentially deep dir tree scan: norecursedirs = build dist docs src/sphinxcontrib_towncrier.egg-info .cache .eggs .git .github .tox *.egg testpaths = tests/ xfail_strict = true