Repository navigation
Conversation
Add a `config-flow-tests` check for home-assistant/core that fails when a PR adds `homeassistant/components/<domain>/config_flow.py` without config flow tests. Tests count when the PR adds or changes a `tests/components/<domain>/test_config_flow*.py`, or when `test_config_flow.py` already exists at the head commit. Only org members can waive it. This closes the gap where Codecov's 100% patch target on config_flow.py never fires because CI skips integrations without a tests folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLHDn89A2kWbEMXXcWAysQ
main added its own config-flow-tests rule (#106, #193). Keep main's rule and messages as the base and fold in this branch's extra cases: split test_config_flow_*.py files, tests already at the head commit, nested config_flow.py ignored, and missing test paths named in the failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLHDn89A2kWbEMXXcWAysQ
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.
Proposed change
Extends the
config-flow-testscheck (added in #106) so it stops failing PRs that do have config flow tests:tests/components/<domain>/test_config_flow*.pycounts, e.g.test_config_flow_options.py. Removed files still don't count.tests/components/<domain>/test_config_flow.pyalready exists at the head commit, even if the PR doesn't touch it.homeassistant/components/<domain>/config_flow.pycounts as a new config flow; aconfig_flow.pyin a subpackage is ignored.Skip/pass messages, the docs link, events and waiver settings are unchanged from #106, so the dispatch snapshots don't change. All of #106's tests are kept as they were; new tests cover the cases above.
Type of change
Additional information
Checklist
mise run test). Your PR cannot be merged unless tests pass.mise run check).mise run format).If behaviour, configuration, or environment variables changed:
README.mdand.env.examplehave been updated accordingly.Generated by Claude Code