Skip to content

test: compare Unicode string values exactly - #275

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

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

Conversation

@Mohamedajab

Copy link
Copy Markdown
Contributor

Add coverage for the JSON Patch test operation 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.

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

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

@stefankoegl
stefankoegl merged commit 5f5cbda into stefankoegl:master Nov 19, 2026
22 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