Skip to content

TEST: Rename converter/ to prompt_converter/ and add 19 converter tests#1594

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

TEST: Rename converter/ to prompt_converter/ and add 19 converter tests#1594
romanlutz wants to merge 1 commit intomicrosoft:mainfrom
romanlutz:test/prompt-converter-coverage

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

Renames the test directory to match the source package and adds unit tests for 19 previously untested converters.

Changes

Directory Rename

  • \ ests/unit/converter/\ → \ ests/unit/prompt_converter/\ (matches \pyrit/prompt_converter/)

New Test Files (19)

All algorithmic converters — no LLM mocking needed:

Converter Test Focus
AtbashConverter Cipher encoding, digit reversal, append_description
Base64Converter Multiple encoding functions (b64, urlsafe, b16)
CaesarConverter Shift offset, wraparound, case preservation, validation
CharacterSpaceConverter Space insertion, punctuation removal
FlipConverter Text reversal, palindromes
MorseConverter Morse encoding, word separators
ROT13Converter ROT13 cipher, roundtrip verification
SearchReplaceConverter Regex patterns, list replacements
StringJoinConverter Character joining with custom separators
SuffixAppendConverter Suffix appending, empty suffix validation
UnicodeReplacementConverter \\uXXXX format, space encoding
UnicodeSubstitutionConverter High Unicode codepoint mapping
UrlConverter URL encoding of special characters
RandomCapitalLettersConverter Percentage-based capitalization
EmojiConverter Letter-to-emoji mapping
AsciiArtConverter ASCII art font rendering
AsciiSmugglerConverter Unicode Tag encode/decode roundtrip
SneakyBitsSmugglerConverter Invisible bit-level encode/decode
VariationSelectorSmugglerConverter Variation Selector encode/decode

Testing

All 116 new tests pass locally. Each test covers basic conversion, edge cases (empty strings), unsupported input types, and input/output type support.

Renames the test directory to match the source package name.

Adds unit tests for 19 previously untested converters:
- AtbashConverter, Base64Converter, CaesarConverter
- CharacterSpaceConverter, FlipConverter, MorseConverter
- ROT13Converter, SearchReplaceConverter, StringJoinConverter
- SuffixAppendConverter, UnicodeReplacementConverter
- UnicodeSubstitutionConverter, UrlConverter
- RandomCapitalLettersConverter, EmojiConverter
- AsciiArtConverter, AsciiSmugglerConverter
- SneakyBitsSmugglerConverter, VariationSelectorSmugglerConverter

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