Skip to content

Commit 67b9e6c

Browse files
neiljpnedbat
authored andcommittedMar 20, 2023
build: Migrate pytest configuration to pyproject.toml.
1 parent 4024ef4 commit 67b9e6c

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed
 

‎pyproject.toml

+26
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,32 @@ exclude = """(?x)(
2828
| ^tests/balance_xdist_plugin\\.py$ # not part of our test suite.
2929
)"""
3030

31+
[tool.pytest.ini_options]
32+
addopts = "-q -n auto -p no:legacypath --strict-markers --no-flaky-report -rfEX --failed-first"
33+
python_classes = "*Test"
34+
markers = [
35+
"expensive: too slow to run during \"make smoke\"",
36+
]
37+
38+
# How come these warnings are suppressed successfully here, but not in conftest.py??
39+
filterwarnings = [
40+
"ignore:the imp module is deprecated in favour of importlib:DeprecationWarning",
41+
"ignore:distutils Version classes are deprecated:DeprecationWarning",
42+
"ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning",
43+
]
44+
45+
# xfail tests that pass should fail the test suite
46+
xfail_strict = true
47+
48+
balanced_clumps = [
49+
# Because of expensive session-scoped fixture:
50+
"VirtualenvTest",
51+
# Because of shared-file manipulations (~/tests/actual/testing):
52+
"CompareTest",
53+
# No idea why this one fails if run on separate workers:
54+
"GetZipBytesTest",
55+
]
56+
3157
[tool.scriv]
3258
# Changelog management: https://pypi.org/project/scriv/
3359
format = "rst"

‎setup.cfg

-23
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
22
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
33

4-
[tool:pytest]
5-
addopts = -q -n auto -p no:legacypath --strict-markers --no-flaky-report -rfEX --failed-first
6-
python_classes = *Test
7-
markers =
8-
expensive: too slow to run during "make smoke"
9-
10-
# How come these warnings are suppressed successfully here, but not in conftest.py??
11-
filterwarnings =
12-
ignore:the imp module is deprecated in favour of importlib:DeprecationWarning
13-
ignore:distutils Version classes are deprecated:DeprecationWarning
14-
ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning
15-
16-
# xfail tests that pass should fail the test suite
17-
xfail_strict = true
18-
19-
balanced_clumps =
20-
; Because of expensive session-scoped fixture:
21-
VirtualenvTest
22-
; Because of shared-file manipulations (~/tests/actual/testing):
23-
CompareTest
24-
; No idea why this one fails if run on separate workers:
25-
GetZipBytesTest
26-
274
[metadata]
285
license_files = LICENSE.txt

0 commit comments

Comments
 (0)
Please sign in to comment.