Skip to content

TEST: Rename target/ to prompt_target/ and add target tests#1595

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

TEST: Rename target/ to prompt_target/ and add target tests#1595
romanlutz merged 4 commits intomicrosoft:mainfrom
romanlutz:test/prompt-target-coverage

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

Renames the test directory to match the source package and adds unit tests for 4 previously untested prompt target files.

Changes

Directory Rename

  • \ ests/unit/target/\ → \ ests/unit/prompt_target/\ (matches \pyrit/prompt_target/)

New Test Files (4)

Source File Tests Coverage
\ ext_target.py\ 7 Init (stdout/custom stream), send_prompt writes to stream, cleanup
\�atch_helper.py\ 13 Chunking, rate limit validation, batch_task_async
\common/utils.py\ 15 Temperature/top_p validation, rate limiting decorator
\common/prompt_chat_target.py\ 8 Default/custom capabilities, set_system_prompt, response format

Testing

All 43 new tests pass locally.

romanlutz and others added 2 commits April 11, 2026 18:03
Renames the test directory to match the source package name.

Adds unit tests for previously untested prompt target files:
- TextTarget (text_target.py)
- BatchHelper (batch_helper.py)
- Target utilities (common/utils.py)
- PromptChatTarget base (common/prompt_chat_target.py)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread tests/unit/prompt_target/test_prompt_chat_target.py Outdated
Comment thread tests/unit/prompt_target/test_batch_helper.py
Copy link
Copy Markdown
Contributor

@hannahwestra25 hannahwestra25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few minor comments

@hannahwestra25 hannahwestra25 self-assigned this Apr 13, 2026
romanlutz and others added 2 commits April 13, 2026 10:38
- test_prompt_chat_target: use supports_multi_turn=True (False is default)
- test_batch_helper: add comments clarifying that no-raise is the assertion

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz merged commit f2c05a1 into microsoft:main Apr 13, 2026
35 checks passed
@romanlutz romanlutz deleted the test/prompt-target-coverage branch April 13, 2026 17:50
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