Introduce roundtrip testing - #207
Conversation
5c32300 to
2977fa2
Compare
michaelmior
left a comment
There was a problem hiding this comment.
LGTM, just one minor suggestion.
|
@michaelmior Is there anything else that needs to be addressed or considered before this can be merged? |
|
@kurtmckee Nope! Go for it :) (I guess a minor merge conflict changelog needs to be resolved, but obviously not a big deal.) |
|
I don't have merge permissions on the project. 👍 I'll fix the merge conflict straight away, though! |
2977fa2 to
1a19fc5
Compare
|
Rebased on I also fixed a typo in the CHANGELOG (the word "pickly" -> "pickle") and removed trailing whitespace. |
|
Merged! Thanks :) |
|
Any chance of a release to now remove your use of the deprecated https://security.snyk.io/vuln/SNYK-PYTHON-PLY-15046763 |
While working on #206, I kept encountering bugs and missing features in the existing implementation's
JsonPathstring serialization and equality methods that hampered comparison and roundtrip testing. I'm therefore submitting this PR to fix bugs in the existing implementation.This PR introduces the following changes:
I had hypothesis generate ~10,000,000 examples cumulatively, which identified a number of issues in the current implementation:
Added
OperationinstancesUnionandIntersectinstancesFixed
This fixes serialization and re-parsing of
"00",'%','0@'and"&'".Operationinstances can now be serialized.This fixes serialization of
0-@andA -A.SortedThisinstances can now be serialized and re-parsed.This fixes serialization of
0[/0].Childprecedence is now preserved using parentheses during serialization.This ensures that serialized strings like
a..b[c]serialize and re-parse identically.This fixes parsing of
10, which was parsed as two separate fields.SortedThisinstances.