Repository navigation
test: keep percent escapes literal in member names - #131
Merged
stefankoegl merged 1 commit intoNov 25, 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 were identified in the regression-test additions for literal percent escapes in JSON Pointer member names.
No open issues 🎉
What changed in this PR
Adds regression coverage confirming that JSON Pointer member names preserve percent escapes literally, without changing the parser or adding URI-fragment support.
Changes:
- Covers
a%2Fb,%7E1, and%25, verifying that path round-trips and reads select the literal member. - Checks that copied updates leave both the URL-decoded counterpart and the original document unchanged.
| File | Description |
|---|---|
tests.py |
Adds three subtests for literal percent-escape lookup and copied updates. |
Review effort: Balanced
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 three test cases for literal percent escapes in JSON object member names: a%2Fb, %7E1 and %25. Each case checks that reading and updating the literal name leaves its URL-decoded counterpart alone.
The current code already behaves correctly. This only adds coverage; it does not add URI-fragment support or change the parser.
All 102 tests passed on Windows / Python 3.14. Flake8 and git diff --check passed. Temporarily adding URL decoding in memory made all three new cases fail, without changing the source file. Other platforms and Python versions were not tested locally.