Skip to content

Commit 86baf94

Browse files
soodokuclaude
andauthored
Configure pytest to fail on what it should fail on (#25)
py-canon 1.3.0 puts the whole sp-repo-review PP301-PP309 set in the template: minversion, log_level, xfail_strict, filterwarnings = ["error"], and -ra/--strict-config/--strict-markers in addopts. These decide whether a run *fails* rather than how it reads. Without filterwarnings a dependency's DeprecationWarning stays invisible until the release that removes the API; without --strict-markers a typo in a marker name selects nothing and reports success; without --strict-config a typo in this very table is ignored. Applied with `preen fix pytest-config`, and the suite was run under the new settings before this was opened -- the point of the change is that warnings now fail, so a config that quietly breaks the suite would defeat it. Claude-Session: https://claude.ai/code/session_011SkMDqnEFUgr7Mbc1HwMqX Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7ff001a commit 86baf94

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ typeCheckingMode = "standard"
121121

122122
[tool.pytest.ini_options]
123123
testpaths = ["tests"]
124+
minversion = "6"
125+
log_level = "INFO"
126+
xfail_strict = true
127+
filterwarnings = ["error"]
128+
addopts = ["--strict-config", "--strict-markers", "-ra"]
124129

125130
[tool.coverage.run]
126131
source = ["hbw"]

0 commit comments

Comments
 (0)