test: ECI roundtrip coverage — FLG(n) sequence and charset encoding#12
Merged
greyllmmoder merged 1 commit intomainfrom Apr 9, 2026
Merged
test: ECI roundtrip coverage — FLG(n) sequence and charset encoding#12greyllmmoder merged 1 commit intomainfrom
greyllmmoder merged 1 commit intomainfrom
Conversation
…Item 4) Add 5 pytest functions to test_core.py verifying that ECI FLG(n) tokens are correctly prepended and that AztecCode encodes non-Latin payloads without error. - encoding_to_eci contains expected ECI values for utf-8, iso8859-1/8, shift_jis - find_optimal_sequence(utf-8) produces [Shift.PUNCT, Misc.FLG, 2, 26, ...] - find_optimal_sequence(iso8859-1) produces [Shift.PUNCT, Misc.FLG, 1, 1, ...] - AztecCode encodes UTF-8 euro sign and Hebrew iso8859-8 payload without error - All 99 tests pass, coverage 90%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_core.pycovering ECI FLG(n) sequence correctness and non-Latin encodingencoding_to_ecidict values for utf-8, iso8859-1/8, shift_jisfind_optimal_sequenceproduces correct[Shift.PUNCT, Misc.FLG, n, eci_value, ...]prefixAztecCodeencodes UTF-8 (€ sign) and Hebrew (iso8859-8) payloads without errorTesting
Notes / Risks