Skip to content

test: ECI roundtrip coverage — FLG(n) sequence and charset encoding#12

Merged
greyllmmoder merged 1 commit intomainfrom
test/eci-encoding
Apr 9, 2026
Merged

test: ECI roundtrip coverage — FLG(n) sequence and charset encoding#12
greyllmmoder merged 1 commit intomainfrom
test/eci-encoding

Conversation

@greyllmmoder
Copy link
Copy Markdown
Owner

Summary

  • Adds 5 pytest functions to tests/test_core.py covering ECI FLG(n) sequence correctness and non-Latin encoding
  • Validates encoding_to_eci dict values for utf-8, iso8859-1/8, shift_jis
  • Verifies find_optimal_sequence produces correct [Shift.PUNCT, Misc.FLG, n, eci_value, ...] prefix
  • Confirms AztecCode encodes UTF-8 (€ sign) and Hebrew (iso8859-8) payloads without error

Testing

  • All 99 tests pass, coverage ≥90%

Notes / Risks

  • Test-only change — no production code modified

…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%
@greyllmmoder greyllmmoder merged commit b54360c into main Apr 9, 2026
16 checks passed
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