refactor(tests): extract factory helpers to resolve code duplication in utils_test#445
refactor(tests): extract factory helpers to resolve code duplication in utils_test#445olivermeyer wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors test code in tests/aignostics/application/utils_test.py to eliminate code duplication by extracting three factory helper functions. The changes target tests for the retrieve_and_print_run_details function, which previously had significant boilerplate in constructing test data.
Changes:
- Adds three factory helper functions (
_make_run_data,_make_item_result,_make_mock_run) to create test fixtures with sensible defaults - Refactors 7 tests for
retrieve_and_print_run_detailsto use these factories instead of verbose inline construction - Moves imports of
ArtifactOutput,ArtifactState,ArtifactTerminationReason, andItemOutputfrom function-level to module-level
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (63.03%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage. |
c50c19d to
b913f33
Compare
…in utils_test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b913f33 to
4069404
Compare
|




This should pass SonarCloud's quality gate.