diff --git a/src/sp_repo_review/checks/pyproject.py b/src/sp_repo_review/checks/pyproject.py index 595a7e42..e1df7231 100644 --- a/src/sp_repo_review/checks/pyproject.py +++ b/src/sp_repo_review/checks/pyproject.py @@ -214,7 +214,12 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: support native configuration and toml config files). ```toml + # Old pytest [tool.pytest.ini_options] + minversion = "6" + + # pytest 9 + [tool.pytest] minversion = "9" ``` """ @@ -238,8 +243,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: The `testpaths` setting should be set to a reasonable default. ```toml + # Old pytest [tool.pytest.ini_options] testpaths = ["tests"] + + # pytest 9+ + [tool.pytest] + testpaths = ["tests"] ``` """ _, options = pytest @@ -259,8 +269,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: failures. ```toml + # Old pytest [tool.pytest.ini_options] log_level = "INFO" + + # pytest 9+ + [tool.pytest] + log_level = "INFO" ``` """ _, options = pytest @@ -283,6 +298,9 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: ```toml [tool.pytest.ini_options] xfail_strict = true + + [tool.pytest] + strict = true ``` """ _, options = pytest @@ -307,8 +325,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: config setting is misspelled. ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + strict = true ``` """ _, options = pytest @@ -333,8 +356,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: be specified in config, avoiding misspellings. ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + strict = true ``` """ _, options = pytest @@ -358,8 +386,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: (print summary of all fails/errors). ```toml + # Old pytest [tool.pytest.ini_options] addopts = ["-ra", "--strict-config", "--strict-markers"] + + # pytest 9+ + [tool.pytest] + addopts = ["-ra"] ``` """ loc, options = pytest @@ -382,8 +415,13 @@ def check(pytest: tuple[PytestFile, dict[str, Any]]) -> bool: will hide important warnings otherwise, like deprecations. ```toml + # Old pytest [tool.pytest.ini_options] filterwarnings = ["error"] + + # pytest 9+ + [tool.pytest] + filterwarnings = ["error"] ``` """ _, options = pytest