test: achieve 100% test coverage and require it in Makefile#500
Merged
Conversation
I added a test for the bot-skip branch in the repo.contributors() path (contributors.py line 193) and raised the coverage threshold from 80% to 100% in the Makefile test target. Coverage moves from 99.69% to 100%. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Zack Koppert <zkoppert@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR achieves 100% test coverage by adding a test for the bot-skip branch in the repo.contributors() path (the else branch when no end_date is provided), and raises the Makefile coverage threshold from 80% to 100% to prevent future coverage regression.
Changes:
- Added
test_get_contributors_no_end_date_skips_bottest that exercises the bot-skip logic at line 192 ofcontributors.py - Raised
--cov-fail-underthreshold in the Makefile from 80 to 100
Show a summary per file
| File | Description |
|---|---|
| test_contributors.py | Adds a new test verifying that bot users (e.g., dependabot[bot]) are skipped when using the repo.contributors() path (no end date) |
| Makefile | Raises the pytest coverage failure threshold from 80% to 100% |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
jmeridth
approved these changes
Jun 16, 2026
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 Changes
The bot-skip branch in the
repo.contributors()path (line 193 ofcontributors.py) was the only uncovered line, keeping coverage at 99.69%. I added a test that exercises this path with a[bot]user and raised the Makefile coverage threshold from 80% to 100% so regressions are caught immediately.--cov-fail-underTradeoffs: Requiring 100% means future contributors must cover new lines before merging. Given the repo's small surface area (322 statements), this is a reasonable gate that prevents coverage drift without being burdensome.
Testing
I ran
make testand confirmed all 65 tests pass with 100% coverage. I ranmake lintand confirmed a clean 10.00/10 pylint score with no issues from flake8, isort, mypy, or black.Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducing