Skip to content

TEST: Add unit tests for pyrit/common/ utilities#1600

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

TEST: Add unit tests for pyrit/common/ utilities#1600
romanlutz wants to merge 1 commit intomicrosoft:mainfrom
romanlutz:test/common-coverage

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

Adds unit tests for 10 previously untested utility files in pyrit/common/.

New Test Files

Source File Tests Coverage
apply_defaults.py 22 Sentinel, scope hashing, registry CRUD, decorator with inheritance
csv_helper.py 5 Read/write/roundtrip
data_url_converter.py 4 Supported formats, errors, data URL output
deprecation.py 4 Warnings with callables, classes, strings, mixed
display_response.py 5 Notebook skip, blocked response, image read/display
path.py 14 Path constants, in_git_repo, get_default_data_path
question_answer_helpers.py 3 Prompt formatting
singleton.py 3 Identity, distinct classes, init preservation
utils.py 7 combine_list, to_sha256
yaml_loadable.py 4 Basic load, from_dict dispatch, error cases

Testing

All 71 tests pass locally.

Adds tests for 10 previously untested utility files:
- apply_defaults.py (decorator, sentinel, registry)
- csv_helper.py (read/write/roundtrip)
- data_url_converter.py (format support, encoding)
- deprecation.py (warnings for callables, classes)
- display_response.py (notebook skip, image display)
- path.py (constants, git_repo detection, default paths)
- question_answer_helpers.py (prompt formatting)
- singleton.py (identity, distinct classes)
- utils.py (combine_list, to_sha256)
- yaml_loadable.py (basic load, from_dict, errors)

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