Skip to content

test: keep distinct Unicode member names separate - #130

Merged
stefankoegl merged 1 commit into
stefankoegl:masterfrom
Mohamedajab:test/exact-unicode-members
Nov 19, 2026
Merged

stefankoegl merged 1 commit into
stefankoegl:masterfrom
Mohamedajab:test/exact-unicode-members

Conversation

@Mohamedajab

Copy link
Copy Markdown
Contributor

Add tests for two keys that look alike but use different Unicode characters: a single accented character and a letter followed by a combining accent.

The tests check that pointers read and update the exact key, leave the other key unchanged, and do not match a missing key through Unicode normalization. This covers the existing behaviour required by RFC 6901 section 4. No library code changed.

Validation: all 101 tests passed on Python 3.14. Flake8 and git diff --check passed. Other Python versions, distribution builds and docs builds were not tested locally.

Signed-off-by: Mohamed Ajab <mohamedajab8@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the Unicode key-matching regression test changes.

No open issues 🎉

What changed in this PR

Adds regression tests for RFC 6901’s requirement to match Unicode member names exactly, without normalization. Library code is unchanged.

Changes:

  • Verify that composed and decomposed Unicode keys remain distinct through pointer construction, serialization, and lookup.
  • Check that copy-on-write updates change only the exact key and preserve the original document.
  • Confirm that a visually similar missing key returns the supplied default or raises JsonPointerException, without modifying the document.
File Description
tests.py Adds two tests covering exact Unicode key matching, isolated updates, and missing-key behavior.

Review effort: Balanced

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.864%. remained the same — Mohamedajab:test/exact-unicode-members into stefankoegl:master

@stefankoegl
stefankoegl merged commit 9c4d3da into stefankoegl:master Nov 19, 2026
26 checks passed
@stefankoegl

Copy link
Copy Markdown
Owner

Thanks!

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.

4 participants