Skip to content

test: keep percent escapes literal in member names - #131

Merged
stefankoegl merged 1 commit into
stefankoegl:masterfrom
Mohamedajab:test/literal-percent-members
Nov 25, 2026
Merged

stefankoegl merged 1 commit into
stefankoegl:masterfrom
Mohamedajab:test/literal-percent-members

Conversation

@Mohamedajab

Copy link
Copy Markdown
Contributor

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.

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

Copy link
Copy Markdown

Coverage Status

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

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 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

@stefankoegl
stefankoegl merged commit e1fa1ba into stefankoegl:master Nov 25, 2026
21 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.

4 participants