Move pytest configuration settings to `.pytest.toml` (#14082)

This commit is contained in:
Adam Turner authored and GitHub committed 2025-11-24 23:20:00 +00:00
1 parent 8e7824234e
commit 0d5fcb82a9
3 files changed
+34 -26

No files matched your search

+2
View File
@@ -4,11 +4,13 @@ on:
push:
paths:
- ".github/workflows/main.yml"
- ".pytest.toml"
- "sphinx/**"
- "tests/**"
pull_request:
paths:
- ".github/workflows/main.yml"
- ".pytest.toml"
- "sphinx/**"
- "tests/**"
+31
View File
@@ -0,0 +1,31 @@
# https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
[pytest]
minversion = "9.0"
# https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags
addopts = [
"-ra",
"--import-mode=prepend",
# "--pythonwarnings=error",
]
empty_parameter_set_mark = "xfail"
filterwarnings = [
"all",
"ignore::DeprecationWarning:docutils.io",
"ignore:Distutils was imported before Setuptools:UserWarning:_distutils_hack",
"ignore:Setuptools is replacing distutils:UserWarning:_distutils_hack",
"ignore::DeprecationWarning:pyximport.pyximport",
"ignore::ImportWarning:importlib._bootstrap",
]
log_cli_level = "INFO"
markers = [
"apidoc",
]
testpaths = ["tests"]
strict_config = true
strict_markers = true
#strict_parametrization_ids = true
strict_xfail = true
+1 -26
View File
@@ -118,7 +118,7 @@ package = [
"twine>=6.1",
]
test = [
"pytest>=8.0",
"pytest>=9.0",
"pytest-xdist[psutil]>=3.4",
"cython>=3.0", # for Cython compilation
"defusedxml>=0.7.1", # for secure XML/HTML parsing
@@ -304,31 +304,6 @@ disallow_untyped_defs = false
module = ["tests.test_util.typing_test_data"]
ignore_errors = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-ra",
"--import-mode=prepend",
# "--pythonwarnings=error",
"--strict-config",
"--strict-markers",
]
empty_parameter_set_mark = "xfail"
filterwarnings = [
"all",
"ignore::DeprecationWarning:docutils.io",
"ignore:Distutils was imported before Setuptools:UserWarning:_distutils_hack",
"ignore:Setuptools is replacing distutils:UserWarning:_distutils_hack",
"ignore::DeprecationWarning:pyximport.pyximport",
"ignore::ImportWarning:importlib._bootstrap",
]
log_cli_level = "INFO"
markers = [
"apidoc",
]
testpaths = ["tests"]
xfail_strict = true
[tool.coverage.run]
branch = true
parallel = true