Skip to content

test(metrics): increase coverage to 99% for metrics module#35

Merged
NickStr11 merged 1 commit intomainfrom
test/metrics-coverage-80-plus-6483214640348583675
Feb 25, 2026
Merged

test(metrics): increase coverage to 99% for metrics module#35
NickStr11 merged 1 commit intomainfrom
test/metrics-coverage-80-plus-6483214640348583675

Conversation

@NickStr11
Copy link
Copy Markdown
Owner

The pull request increases the test coverage of the tools/metrics module from 62% to 99%. It introduces comprehensive unit tests for all components, including mocking of external CLI calls (gh) and handling of various edge cases such as empty repositories and API errors. All tests pass successfully.

Fixes #30


PR created automatically by Jules for task 6483214640348583675 started by @NickStr11

Expanded `tools/metrics/tests/test_metrics.py` to cover all functions and
logical branches in `main.py`. Added unit tests for:
- AgentMetrics properties
- parse_date
- get_repo_info (with mocking)
- fetch_pr_data (with mocking)
- determine_agent (including edge cases)
- format_report
- calculate_metrics (including edge cases)
- main function (with mocking)

Coverage for `main.py` increased from 62% to 99%.

Co-authored-by: NickStr11 <37849063+NickStr11@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@NickStr11 NickStr11 merged commit 6b2c0d4 into main Feb 25, 2026
1 check passed
@NickStr11 NickStr11 deleted the test/metrics-coverage-80-plus-6483214640348583675 branch March 5, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(metrics): coverage 80%+ для metrics модуля

1 participant