Unit tests for more coverage#340
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
thanks for opening this |
Covers 109 new tests across utils (62) and config (47), bringing total to 153. Includes behavior-guard tests for float timestamp handling and YAML numeric coercion. add unit tests for algorithm base class, EDivisive, IsolationForest, and CMR 41 new tests covering output formatting (json/text/junit), analysis caching, series setup, direction/threshold/ack filtering, changepoint grouping, anomaly detection, mean comparison, and the algorithm factory. add unit tests for github_client.py 60 new tests covering timestamp coercion (13 input types), ISO parsing, interval validation, request error handling (404/403/500/timeout/bad JSON), URL building, release/commit processing, caching, change context assembly, and PR creation date lookup. add unit tests for run_test.py and matcher.py coverage gaps 29 new tests for run_test.py: get_algorithm_type, has_early_changepoint, clear_early_changepoints, get_start_timestamp (incl. PR creation date), tabulate_average_values, and NamedTuple structures. 20 new tests for matcher.py gaps: get_metadata_by_uuid actual logic, get_uuid_by_metadata edge cases (buildUrl fallback, additional_fields, dotted version field, not clause, ocpMajorVersion, pullNumber=0), parse_agg_results without aggregations, convert_to_df/save_results column filtering. expand matcher.py test coverage for date ranges, get_results, filter_runs, agg types add unit tests for visualization.py with direction behavior guard Covers _short_version, _prepare_timestamps, _classify_changepoint, VizData, _build_test_figure, and generate_test_html. Includes behavior guard documenting that direction=1 means increase-is-regression, which is opposite to the EDivisive convention. add unit tests for reporting/report.py Covers ReportType enum, produce_report dispatching, LOG/JSON/regressions_only formats, changepoint annotations, column_group_size, and helper methods. refactor pylint into make lint, exclude tests, add TODO_unittest.txt Move pylint invocation from workflow inline command to Makefile lint target. Exclude test files from lint (grep -v '/tests/') and document remaining lint cleanup in TODO_unittest.txt. Partial lint fixes applied: unused imports removed, unused variables prefixed, _make_algo renamed. remove TODO file Add pylint to makefile help add query_index return_all unit tests Updates to resolve warnings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Andrew Collins <ancollin@redhat.com> Update tests for percentile iteration changes Co-Authored-By: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6
Signed-off-by: Andrew Collins <ancollin@redhat.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Type of change
Description
Generated unit tests for 100% coverage to provide a foundation before any refactoring.
Related Tickets & Documents
Checklist before requesting a review
Testing