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]
# Add a global timeout to prevent a hung CI
timeout = 600
# Look for tests only in tests directories.
# Later we could change this to just "tests/**/test_*.py"
testpaths =
tests
python_files = "tests/functional/test_*.py" "tests/unit/test_*.py"
# Don't search test-data for test-cases
norecursedirs:
tests/functional/data
tests/functional/logs
tests/functional/modules
tests/functional/scripts
tests/functional/specs
tests/scripts
tests/unit/Tree_files
tests/unit/hookutils_files
tests/unit/test_modulegraph/testdata
tests/unit/test_modulegraph/testpkg-*
filterwarnings =
; in unit/test_altgraph/test_graph.py
ignore:Please use assertEqual instead.:DeprecationWarning
; tests/unit/test_modulegraph/test_modulegraph.py::TestFunctions::test_os_listdir
ignore:Use zipio.listdir instead of os_listdir:DeprecationWarning:
; Enable Python's improperly closed file handle detection...
error::ResourceWarning:
; ... and force pytest to raise an error if the ResourceWarning is emitted during test cleanup.
error::pytest.PytestUnraisableExceptionWarning:
; Exempt "unclosed <socket.socket ...>" ResourceWarning, which seems to be triggered by
; pytest-rerunfailures when used with pytest >= 8.4.0 under free-threaded python 3.13.
default:unclosed <socket.socket:ResourceWarning:
# Display summary info for (s)skipped, (X)xpassed, (x)xfailed, (f)failed and (e)errored tests
# Skip doctest text files
# If you want to run just a subset of test use command
#
# pytest -k test_name
#
addopts = -v -rsfE --doctest-glob= -p no:legacypath
markers =
darwin: only run on macOS
linux: only runs on GNU/Linux
win32: only runs on Windows
xvfb_colordepth=24
|