Repository navigation
test+docs: strict markers, test ruff ignore, docstring coverage gate - #54
Merged
Merged
Conversation
Three XS adoptions from the sibling 1komma5-ha repo's test stack: 1. pytest: addopts += "-ra --strict-markers". -ra prints a short summary of every non-pass outcome at the end of the run; --strict-markers rejects typos in @pytest.mark.* decorators instead of silently ignoring them. 2. ruff per-file-ignores: "tests/*" = ["B011"] so `assert False` is accepted as explicit test intent (ha pattern). 3. interrogate>=1.7 as a dev-dep with a docstring-coverage gate at fail-under=85 %. Scope excludes tests, scripts, cli.py (argparse glue) and sync.py (mechanical facade); from_dict classmethods are ignored via ignore-regex. Current baseline: 96.4 %. CI runs the gate as a new `interrogate` job in lint.yml. The CONTRIBUTING.md trailing-whitespace drop is a side effect of pre-commit's trim-trailing-whitespace hook. Co-Authored-By: Claude Opus 4.7 <[email protected]> Claude-Session: https://claude.ai/code/session_01RgkYaQACLxezeceA1hrXQs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Erste Welle Adoptions aus der HA-Testing-Analyse. Drei XS-Hebel ohne neue Dependencies im Hot-Path:
1. pytest
-ra --strict-markers2. ruff per-file-ignore für Tests
`"tests/*" = ["B011"]` erlaubt `assert False` als explizite Test-Intention (bekannter HA-Pattern), ohne B011 projekt-weit zu entschärfen.
3. Interrogate-Docstring-Coverage-Gate
Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01RgkYaQACLxezeceA1hrXQs