Skip to content

TEST: Add unit tests for pyrit/executor/ module#1603

Open
romanlutz wants to merge 1 commit intomicrosoft:mainfrom
romanlutz:test/executor-coverage
Open

TEST: Add unit tests for pyrit/executor/ module#1603
romanlutz wants to merge 1 commit intomicrosoft:mainfrom
romanlutz:test/executor-coverage

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

Adds unit tests for previously untested executor printer and config files.

New Test Files

Source File Tests Coverage
attack/printer/attack_result_printer.py 12 Static methods: outcome icon mapping, time formatting with boundaries
attack/printer/console_printer.py 31 Init, color output, headers/footers, score formatting, reasoning extraction, conversation printing
core/config.py 6 StrategyConverterConfig dataclass defaults and mutations
attack/component/prepended_conversation_config.py 10 Defaults, normalizer fallback, default() vs for_non_chat_target() factories

Testing

All 59 tests pass locally.

Adds tests for previously untested executor files:
- attack/printer/attack_result_printer.py (outcome icons, time formatting)
- attack/printer/console_printer.py (color output, score formatting)
- core/config.py (StrategyConverterConfig dataclass)
- attack/component/prepended_conversation_config.py (defaults, factories)

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