Skip to content

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

Open
romanlutz wants to merge 2 commits intomicrosoft:mainfrom
romanlutz:test/score-coverage
Open

TEST: Add unit tests for pyrit/score/ infrastructure#1602
romanlutz wants to merge 2 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 2 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>
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.

1 participant