Skip to content

TEST: Add unit tests for pyrit/score/ infrastructure#1602

Merged
romanlutz merged 4 commits intomicrosoft:mainfrom
romanlutz:test/score-coverage
Apr 13, 2026
Merged

TEST: Add unit tests for pyrit/score/ infrastructure#1602
romanlutz merged 4 commits intomicrosoft:mainfrom
romanlutz:test/score-coverage

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

Adds unit tests for 5 previously untested score infrastructure files.

New Test Files

Source File Tests Coverage
score_aggregator_result.py 10 Init, frozen immutability, equality, slots, mixed metadata
printer/scorer_printer.py 4 ABC enforcement, incomplete/complete subclass instantiation
printer/console_scorer_printer.py 28 Init/validation, color output, quality thresholds, scorer info, metrics display
scorer_evaluation/metrics_type.py 9 Enum values, members, from-value lookup
scorer_evaluation/scorer_metrics_io.py 25 JSONL load/append, metrics dict conversion, find by eval hash

Testing

All 77 tests pass locally.

romanlutz and others added 3 commits April 11, 2026 18:05
Adds tests for previously untested score infrastructure files:
- score_aggregator_result.py (init, frozen, equality)
- printer/scorer_printer.py (ABC enforcement)
- printer/console_scorer_printer.py (color output, formatting)
- scorer_evaluation/metrics_type.py (enum values, lookups)
- scorer_evaluation/scorer_metrics_io.py (JSONL I/O, metrics)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz merged commit 84bdf75 into microsoft:main Apr 13, 2026
38 checks passed
@romanlutz romanlutz deleted the test/score-coverage branch April 13, 2026 21:52
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.

2 participants