test: cover remaining contributor paths#395
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands unit test coverage for remaining contributor-related execution paths and a couple of supporting utilities/docs.
Changes:
- Add tests for
get_contributors()edge cases (no commits in range, exception handling) andmain()execution paths. - Add tests for
env.get_int_env_var()invalid parsing andcontributor_stats(__repr__, sponsor info error path). - Adjust README badges formatting to be on separate lines.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test_env.py |
Adds coverage for invalid integer env var parsing. |
test_contributors.py |
Adds coverage for additional contributor filtering/error paths and script/main execution. |
test_contributor_stats.py |
Adds coverage for __repr__ and sponsor info error handling. |
README.md |
Splits badges onto separate lines for readability. |
17001f8 to
1f39dfc
Compare
anything over 100% 🤣 |
|
@vcrombie Would you be able to take a look at the merge conflicts and update the base branch for this PR? Updating the base branch should resolve the linter issues failing in the checks section for you. |
|
Sure, I'll rebase it later in the evening. |
1f39dfc to
b314994
Compare
|
@zkoppert I rebased the branch, please let me know what do you think about the PR? |
cee9fe3 to
af4efb8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
test_contributors.py:187
- The docstring says this test verifies commit searching "only with start date", but
get_contributors()only checks commits when bothstart_dateandend_dateare provided. Update the docstring/test intent accordingly (e.g., assertrepo.commitsis not called whenend_dateis empty).
def test_get_contributors_no_commit_end_date(self, mock_contributor_stats):
"""
Test the get_contributors does the search of commits only with start date
"""
3752ae2 to
ce120e0
Compare
ce120e0 to
73e4058
Compare
73e4058 to
48cbff1
Compare
Signed-off-by: Venu Vardhan Reddy Tekula <venuvrtekula@gmail.com>
48cbff1 to
0eb49a0
Compare
|
Guess I am really pushing the boundaries of copilot here. |
how much coverage is too much coverage
Pull Request
Proposed Changes
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@jeffrey-luszczReviewer
bug,documentation,enhancement,infrastructure,maintenanceorbreaking