You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: reach 100% coverage and enforce in CI (#108)
* test: cover remaining uncovered branches to reach 100%
Adds six targeted unit tests so coverage hits 100% (up from 99%):
- env.py:191: FILTER_TEAMS with an empty middle entry (skip branch)
- slack_notify.py:43: per-repo empty list when other repos are non-empty
- pr_comment.py:92-98: new_conflict_keys lookup, both forward and
reverse (PR-number, other) pair ordering
- pr_comment.py:130, 139: failure paths for update and post returning
False
FILTER_TEAMS edge case is moved to a new TestEnvFilterTeamsEdgeCases
class so TestEnv stays under pylint max-public-methods.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
* ci: raise pytest coverage threshold to 100%
Now that every line is exercised by tests, bump --cov-fail-under from
80 to 100 so a regression in coverage fails CI.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
* test: tighten new assertions after multi-model review
Three independent code-review agents (Opus 4.7, Sonnet 4.6, GPT-5.4)
flagged the same issues on the coverage tests added in the previous
commit. Coverage of the lines was real, but the assertions did not
verify the behavior those lines produce.
- test_post_pr_comments_with_new_conflict_keys and
test_post_pr_comments_new_conflict_keys_reverse_pair: inspect the
body argument passed to _post_comment and assert the 🆕 badge
appears. Without this, deleting pr_comment.py:91-98 would leave
the tests green.
- test_send_slack_notification_skips_repo_with_empty_list: wrap
cluster_conflicts so the test can prove the 'continue' branch
short-circuited. Without this, removing the continue would still
produce one post (cluster_conflicts([]) returns []).
- TestEnvFilterTeamsEdgeCases: fix the misleading docstring. The
class exists to keep TestEnv under pylint's max-public-methods
threshold, not because a test was moved out of TestEnv.
All 287 tests still pass; coverage stays at 100%.
Signed-off-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
---------
Signed-off-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments