Skip to content

Commit 1f30943

Browse files
MNT: Apply Repo-Review suggestions
PP302: Sets a minimum pytest to at least 6 Must have a minversion=, and must be at least 6 (first version to support pyproject.toml configuration). PP304: Sets the log level in pytest log_cli_level should be set. This will allow logs to be displayed on failures. PP305: Specifies xfail_strict xfail_strict should be set. You can manually specify if a check should be strict when setting each xfail. PP306: Specifies strict config --strict-config should be in addopts = [...]. This forces an error if a config setting is misspelled. PP307: Specifies strict markers --strict-markers should be in addopts = [...]. This forces all markers to be specified in config, avoiding misspellings. PP308: Specifies useful pytest summary An explicit summary flag like -ra should be in addopts = [...] (print summary of all fails/errors). RF201: Avoid using deprecated config settings extend-ignore deprecated, use ignore instead (identical)
1 parent 37165a4 commit 1f30943

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ per-file-ignores = [
115115
]
116116

117117
[tool.pytest.ini_options]
118+
minversion = "7"
119+
log_cli_level = "INFO"
120+
xfail_strict = true
118121
norecursedirs = [".git"]
119-
addopts = "-svx --doctest-modules"
122+
addopts = ["-svx", "--doctest-modules", "-ra", "--strict-config", "--strict-markers"]
120123
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE ELLIPSIS"
121124
env = "PYTHONHASHSEED=0"
122125
filterwarnings = ["ignore::DeprecationWarning"]
@@ -163,7 +166,7 @@ extend-select = [
163166
"PT",
164167
"Q",
165168
]
166-
extend-ignore = [
169+
ignore = [
167170
"S311", # We are not using random for cryptographic purposes
168171
"ISC001",
169172
"S603",

0 commit comments

Comments
 (0)