Skip to content

Commit 96d5deb

Browse files
committed
fix: show pytest 9 examples too
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent ab443cc commit 96d5deb

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

src/sp_repo_review/checks/pyproject.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,12 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
214214
support native configuration and toml config files).
215215
216216
```toml
217+
# Old pytest
217218
[tool.pytest.ini_options]
219+
minversion = "6"
220+
221+
# pytest 9
222+
[tool.pytest]
218223
minversion = "9"
219224
```
220225
"""
@@ -238,8 +243,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
238243
The `testpaths` setting should be set to a reasonable default.
239244
240245
```toml
246+
# Old pytest
241247
[tool.pytest.ini_options]
242248
testpaths = ["tests"]
249+
250+
# pytest 9+
251+
[tool.pytest]
252+
testpaths = ["tests"]
243253
```
244254
"""
245255
_, options = pytest
@@ -259,8 +269,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
259269
failures.
260270
261271
```toml
272+
# Old pytest
262273
[tool.pytest.ini_options]
263274
log_level = "INFO"
275+
276+
# pytest 9+
277+
[tool.pytest]
278+
log_level = "INFO"
264279
```
265280
"""
266281
_, options = pytest
@@ -307,8 +322,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
307322
config setting is misspelled.
308323
309324
```toml
325+
# Old pytest
310326
[tool.pytest.ini_options]
311327
addopts = ["-ra", "--strict-config", "--strict-markers"]
328+
329+
# pytest 9+
330+
[tool.pytest]
331+
strict = true
312332
```
313333
"""
314334
_, options = pytest
@@ -333,8 +353,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
333353
be specified in config, avoiding misspellings.
334354
335355
```toml
356+
# Old pytest
336357
[tool.pytest.ini_options]
337358
addopts = ["-ra", "--strict-config", "--strict-markers"]
359+
360+
# pytest 9+
361+
[tool.pytest]
362+
strict = true
338363
```
339364
"""
340365
_, options = pytest
@@ -358,8 +383,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
358383
(print summary of all fails/errors).
359384
360385
```toml
386+
# Old pytest
361387
[tool.pytest.ini_options]
362388
addopts = ["-ra", "--strict-config", "--strict-markers"]
389+
390+
# pytest 9+
391+
[tool.pytest]
392+
addopts = ["-ra"]
363393
```
364394
"""
365395
loc, options = pytest
@@ -382,8 +412,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool:
382412
will hide important warnings otherwise, like deprecations.
383413
384414
```toml
415+
# Old pytest
385416
[tool.pytest.ini_options]
386417
filterwarnings = ["error"]
418+
419+
# pytest 9+
420+
[tool.pytest]
421+
filterwarnings = ["error"]
387422
```
388423
"""
389424
_, options = pytest

0 commit comments

Comments
 (0)