1
1
[project ]
2
2
name = " pytest"
3
- dynamic = [" version" ]
4
3
description = " pytest: simple powerful testing with Python"
4
+ readme = " README.rst"
5
+ keywords = [
6
+ " test" ,
7
+ " unittest" ,
8
+ ]
9
+ license = {text = " MIT" }
5
10
authors = [
6
11
{name = " Holger Krekel" },
7
12
{name = " Bruno Oliveira" },
@@ -11,18 +16,15 @@ authors = [
11
16
{name = " Florian Bruhin" },
12
17
{name = " Others (See AUTHORS)" },
13
18
]
14
- readme = " README.rst"
15
- license = {text = " MIT" }
16
- keywords = [" test" , " unittest" ]
19
+ requires-python = " >=3.8"
17
20
classifiers = [
18
21
" Development Status :: 6 - Mature" ,
19
22
" Intended Audience :: Developers" ,
20
23
" License :: OSI Approved :: MIT License" ,
21
24
" Operating System :: MacOS" ,
22
25
" Operating System :: Microsoft :: Windows" ,
23
- " Operating System :: Unix" ,
24
26
" Operating System :: POSIX" ,
25
- " Programming Language :: Python :: 3 " ,
27
+ " Operating System :: Unix " ,
26
28
" Programming Language :: Python :: 3 :: Only" ,
27
29
" Programming Language :: Python :: 3.8" ,
28
30
" Programming Language :: Python :: 3.9" ,
@@ -33,46 +35,44 @@ classifiers = [
33
35
" Topic :: Software Development :: Testing" ,
34
36
" Topic :: Utilities" ,
35
37
]
36
-
38
+ dynamic = [
39
+ " version" ,
40
+ ]
37
41
dependencies = [
38
- " colorama;sys_platform==' win32' " ,
39
- " exceptiongroup>=1.0.0rc8;python_version<' 3.11' " ,
42
+ ' colorama; sys_platform == " win32" ' ,
43
+ ' exceptiongroup>=1.0.0rc8; python_version < " 3.11" ' ,
40
44
" iniconfig" ,
41
45
" packaging" ,
42
- " pluggy>=1.4.0,<2.0 " ,
43
- " tomli>=1.0.0; python_version<' 3.11' " ,
46
+ " pluggy<2.0, >=1.4" ,
47
+ ' tomli>=1; python_version < " 3.11" ' ,
44
48
]
45
- requires-python = " >=3.8"
46
-
47
49
[project .optional-dependencies ]
48
50
testing = [
49
51
" argcomplete" ,
50
- " attrs>=19.2.0 " ,
52
+ " attrs>=19.2" ,
51
53
" hypothesis>=3.56" ,
52
54
" mock" ,
53
55
" pygments>=2.7.2" ,
54
56
" requests" ,
55
57
" setuptools" ,
56
58
" xmlschema" ,
57
59
]
58
-
59
- [project .scripts ]
60
- "py.test" = " pytest:console_main"
61
- pytest = " pytest:console_main"
62
-
63
60
[project .urls ]
64
- Homepage = " https://docs.pytest.org/en/latest/"
65
61
Changelog = " https://docs.pytest.org/en/stable/changelog.html"
66
- Twitter = " https://twitter.com/pytestdotorg "
62
+ Homepage = " https://docs.pytest.org/en/latest/ "
67
63
Source = " https://github.com/pytest-dev/pytest"
68
64
Tracker = " https://github.com/pytest-dev/pytest/issues"
65
+ Twitter = " https://twitter.com/pytestdotorg"
66
+ [project .scripts ]
67
+ "py.test" = " pytest:console_main"
68
+ pytest = " pytest:console_main"
69
69
70
70
[build-system ]
71
+ build-backend = " setuptools.build_meta"
71
72
requires = [
72
- " setuptools>=45.0 " ,
73
- " setuptools-scm[toml]>=6.2.3" ,
73
+ " setuptools>=61 " ,
74
+ " setuptools-scm[toml]>=6.2.3" ,
74
75
]
75
- build-backend = " setuptools.build_meta"
76
76
77
77
[tool .setuptools .package-data ]
78
78
"_pytest" = [" py.typed" ]
@@ -81,6 +81,86 @@ build-backend = "setuptools.build_meta"
81
81
[tool .setuptools_scm ]
82
82
write_to = " src/_pytest/_version.py"
83
83
84
+ [tool .black ]
85
+ target-version = [' py38' ]
86
+
87
+ [tool .ruff ]
88
+ src = [" src" ]
89
+ line-length = 88
90
+ select = [
91
+ " B" , # bugbear
92
+ " D" , # pydocstyle
93
+ " E" , # pycodestyle
94
+ " F" , # pyflakes
95
+ " I" , # isort
96
+ " PYI" , # flake8-pyi
97
+ " UP" , # pyupgrade
98
+ " RUF" , # ruff
99
+ " W" , # pycodestyle
100
+ ]
101
+ ignore = [
102
+ # bugbear ignore
103
+ " B004" , # Using `hasattr(x, "__call__")` to test if x is callable is unreliable.
104
+ " B007" , # Loop control variable `i` not used within loop body
105
+ " B009" , # Do not call `getattr` with a constant attribute value
106
+ " B010" , # [*] Do not call `setattr` with a constant attribute value.
107
+ " B011" , # Do not `assert False` (`python -O` removes these calls)
108
+ " B028" , # No explicit `stacklevel` keyword argument found
109
+ # pycodestyle ignore
110
+ # pytest can do weird low-level things, and we usually know
111
+ # what we're doing when we use type(..) is ...
112
+ " E721" , # Do not compare types, use `isinstance()`
113
+ # pydocstyle ignore
114
+ " D100" , # Missing docstring in public module
115
+ " D101" , # Missing docstring in public class
116
+ " D102" , # Missing docstring in public method
117
+ " D103" , # Missing docstring in public function
118
+ " D104" , # Missing docstring in public package
119
+ " D105" , # Missing docstring in magic method
120
+ " D106" , # Missing docstring in public nested class
121
+ " D107" , # Missing docstring in `__init__`
122
+ " D209" , # [*] Multi-line docstring closing quotes should be on a separate line
123
+ " D205" , # 1 blank line required between summary line and description
124
+ " D400" , # First line should end with a period
125
+ " D401" , # First line of docstring should be in imperative mood
126
+ " D402" , # First line should not be the function's signature
127
+ " D404" , # First word of the docstring should not be "This"
128
+ " D415" , # First line should end with a period, question mark, or exclamation point
129
+ # ruff ignore
130
+ " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar`
131
+ ]
132
+
133
+ [tool .ruff .format ]
134
+ docstring-code-format = true
135
+
136
+ [tool .ruff .lint .pycodestyle ]
137
+ # In order to be able to format for 88 char in ruff format
138
+ max-line-length = 120
139
+
140
+ [tool .ruff .lint .pydocstyle ]
141
+ convention = " pep257"
142
+
143
+ [tool .ruff .lint .isort ]
144
+ force-single-line = true
145
+ combine-as-imports = true
146
+ force-sort-within-sections = true
147
+ order-by-type = false
148
+ known-local-folder = [" pytest" , " _pytest" ]
149
+ lines-after-imports = 2
150
+
151
+ [tool .ruff .lint .per-file-ignores ]
152
+ "src/_pytest/_py/**/*.py" = [" B" , " PYI" ]
153
+ "src/_pytest/_version.py" = [" I001" ]
154
+ "testing/python/approx.py" = [" B015" ]
155
+
156
+ [tool .check-wheel-contents ]
157
+ # check-wheel-contents is executed by the build-and-inspect-python-package action.
158
+ # W009: Wheel contains multiple toplevel library entries
159
+ ignore = " W009"
160
+
161
+ [tool .pyproject-fmt ]
162
+ indent = 4
163
+
84
164
[tool .pytest .ini_options ]
85
165
minversion = " 2.0"
86
166
addopts = " -rfEX -p pytester --strict-markers"
@@ -140,7 +220,6 @@ markers = [
140
220
" uses_pexpect" ,
141
221
]
142
222
143
-
144
223
[tool .towncrier ]
145
224
package = " pytest"
146
225
package_dir = " src"
@@ -189,83 +268,6 @@ template = "changelog/_template.rst"
189
268
name = " Trivial/Internal Changes"
190
269
showcontent = true
191
270
192
- [tool .black ]
193
- target-version = [' py38' ]
194
-
195
- # check-wheel-contents is executed by the build-and-inspect-python-package action.
196
- [tool .check-wheel-contents ]
197
- # W009: Wheel contains multiple toplevel library entries
198
- ignore = " W009"
199
-
200
- [tool .ruff ]
201
- src = [" src" ]
202
- line-length = 88
203
- select = [
204
- " B" , # bugbear
205
- " D" , # pydocstyle
206
- " E" , # pycodestyle
207
- " F" , # pyflakes
208
- " I" , # isort
209
- " PYI" , # flake8-pyi
210
- " UP" , # pyupgrade
211
- " RUF" , # ruff
212
- " W" , # pycodestyle
213
- ]
214
- ignore = [
215
- # bugbear ignore
216
- " B004" , # Using `hasattr(x, "__call__")` to test if x is callable is unreliable.
217
- " B007" , # Loop control variable `i` not used within loop body
218
- " B009" , # Do not call `getattr` with a constant attribute value
219
- " B010" , # [*] Do not call `setattr` with a constant attribute value.
220
- " B011" , # Do not `assert False` (`python -O` removes these calls)
221
- " B028" , # No explicit `stacklevel` keyword argument found
222
- # pycodestyle ignore
223
- # pytest can do weird low-level things, and we usually know
224
- # what we're doing when we use type(..) is ...
225
- " E721" , # Do not compare types, use `isinstance()`
226
- # pydocstyle ignore
227
- " D100" , # Missing docstring in public module
228
- " D101" , # Missing docstring in public class
229
- " D102" , # Missing docstring in public method
230
- " D103" , # Missing docstring in public function
231
- " D104" , # Missing docstring in public package
232
- " D105" , # Missing docstring in magic method
233
- " D106" , # Missing docstring in public nested class
234
- " D107" , # Missing docstring in `__init__`
235
- " D209" , # [*] Multi-line docstring closing quotes should be on a separate line
236
- " D205" , # 1 blank line required between summary line and description
237
- " D400" , # First line should end with a period
238
- " D401" , # First line of docstring should be in imperative mood
239
- " D402" , # First line should not be the function's signature
240
- " D404" , # First word of the docstring should not be "This"
241
- " D415" , # First line should end with a period, question mark, or exclamation point
242
- # ruff ignore
243
- " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar`
244
- ]
245
-
246
- [tool .ruff .format ]
247
- docstring-code-format = true
248
-
249
- [tool .ruff .lint .pycodestyle ]
250
- # In order to be able to format for 88 char in ruff format
251
- max-line-length = 120
252
-
253
- [tool .ruff .lint .pydocstyle ]
254
- convention = " pep257"
255
-
256
- [tool .ruff .lint .isort ]
257
- force-single-line = true
258
- combine-as-imports = true
259
- force-sort-within-sections = true
260
- order-by-type = false
261
- known-local-folder = [" pytest" , " _pytest" ]
262
- lines-after-imports = 2
263
-
264
- [tool .ruff .lint .per-file-ignores ]
265
- "src/_pytest/_py/**/*.py" = [" B" , " PYI" ]
266
- "src/_pytest/_version.py" = [" I001" ]
267
- "testing/python/approx.py" = [" B015" ]
268
-
269
271
[tool .mypy ]
270
272
mypy_path = [" src" ]
271
273
check_untyped_defs = true
0 commit comments