Repository navigation
test: compare Unicode string values exactly - #275
Merged
stefankoegl merged 1 commit intoNov 19, 2026
Merged
Conversation
Signed-off-by: Mohamed Ajab <mohamedajab8@gmail.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for this test-only change adding Unicode comparison regression coverage.
No open issues 🎉
What changed in this PR
Adds regression coverage for exact Unicode string comparison in the JSON Patch test operation. Library code is unchanged.
Changes:
- Tests exact matches and composed-versus-decomposed Unicode mismatches in direct values, arrays, and objects.
- Verifies that a failed comparison prevents the following replacement and leaves the document unchanged.
| File | Description |
|---|---|
tests.py |
Adds Unicode comparison cases and assertions that failed tests stop subsequent updates. |
Review effort: Balanced
Owner
|
Thanks! |
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.
Add coverage for the JSON Patch
testoperation with strings that look alike but use different Unicode characters. It checks direct values and values nested in arrays and objects.A matching value succeeds. A different Unicode representation fails and stops the following update. This protects the existing string comparison behaviour described in RFC 6902 section 4.6. No library code changed.
Validation: the full unittest run completed 354 tests with one skipped on Python 3.14. Flake8 and git diff --check passed. Other Python versions and distribution builds were not tested locally.