Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some case Failed when run ext_test #111

Closed
Alanscut opened this issue May 23, 2020 · 0 comments
Closed

Some case Failed when run ext_test #111

Alanscut opened this issue May 23, 2020 · 0 comments

Comments

@Alanscut
Copy link
Contributor

Hi @stefankoegl , when I run the external tests json-patch-tests, some case failed, I think some of them are bugs, others are due to unreasonable assertions.
here is the list:

  • 1: pass only when changing add to replace -- not sure if it is a bug
    { "comment": "replace array document with object document?",
      "doc": [],
      "patch": [{"op": "add", "path": "", "value": {}}],
      "expected": {} }
  • 2: failed with KeyError: 'path' before entering the assertion -- unreasonable assertion
    { "comment": "missing 'path' parameter",
      "doc": {},
      "patch": [ { "op": "add", "value": "bar" } ],
      "error": "missing 'path' parameter" }
  • 3: failed with TypeError: expected string or bytes-like object before entering the assertion -- unreasonable assertion
      { "comment": "'path' parameter with null value",
        "doc": {},
        "patch": [ { "op": "add", "path": null, "value": "bar" } ],
        "error": "null is not valid value for 'path'" }

-4: index leading with zero should failed but success -- bug

      { "comment": "test with bad array number that has leading zeros",
        "doc": ["foo", "bar"],
        "patch": [{"op": "test", "path": "/00", "value": "foo"}],
        "error": "test op should reject the array value, it has leading zeros" },
  
      { "comment": "test with bad array number that has leading zeros",
        "doc": ["foo", "bar"],
        "patch": [{"op": "test", "path": "/01", "value": "bar"}],
        "error": "test op should reject the array value, it has leading zeros" }
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

No branches or pull requests

1 participant