Skip to content

Commit 9efb9a7

Browse files
committed
Move pytest configuration settings to .pytest.toml
1 parent 2c3e22e commit 9efb9a7

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

.pytest.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
2+
3+
[pytest]
4+
minversion = "9.0"
5+
6+
# https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags
7+
addopts = [
8+
"-ra",
9+
"--import-mode=prepend",
10+
# "--pythonwarnings=error",
11+
]
12+
13+
empty_parameter_set_mark = "xfail"
14+
filterwarnings = [
15+
"all",
16+
"ignore::DeprecationWarning:docutils.io",
17+
"ignore:Distutils was imported before Setuptools:UserWarning:_distutils_hack",
18+
"ignore:Setuptools is replacing distutils:UserWarning:_distutils_hack",
19+
"ignore::DeprecationWarning:pyximport.pyximport",
20+
"ignore::ImportWarning:importlib._bootstrap",
21+
]
22+
log_cli_level = "INFO"
23+
markers = [
24+
"apidoc",
25+
]
26+
testpaths = ["tests"]
27+
strict = true

pyproject.toml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -304,31 +304,6 @@ disallow_untyped_defs = false
304304
module = ["tests.test_util.typing_test_data"]
305305
ignore_errors = true
306306

307-
[tool.pytest.ini_options]
308-
minversion = "6.0"
309-
addopts = [
310-
"-ra",
311-
"--import-mode=prepend",
312-
# "--pythonwarnings=error",
313-
"--strict-config",
314-
"--strict-markers",
315-
]
316-
empty_parameter_set_mark = "xfail"
317-
filterwarnings = [
318-
"all",
319-
"ignore::DeprecationWarning:docutils.io",
320-
"ignore:Distutils was imported before Setuptools:UserWarning:_distutils_hack",
321-
"ignore:Setuptools is replacing distutils:UserWarning:_distutils_hack",
322-
"ignore::DeprecationWarning:pyximport.pyximport",
323-
"ignore::ImportWarning:importlib._bootstrap",
324-
]
325-
log_cli_level = "INFO"
326-
markers = [
327-
"apidoc",
328-
]
329-
testpaths = ["tests"]
330-
xfail_strict = true
331-
332307
[tool.coverage.run]
333308
branch = true
334309
parallel = true

0 commit comments

Comments
 (0)