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

Fixes the currently failing json-schema-test-suite tests #370

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jsonschema/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ def is_css3_color(instance):
draft6="json-pointer", raises=jsonpointer.JsonPointerException,
)
def is_json_pointer(instance):
if not isinstance(instance, str_types):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a test :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already does - the test fail was what caused me to fix :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah cool. Hm, I thought I'd ran these after updating. Thanks for fixing.

return True
return jsonpointer.JsonPointer(instance)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"jsonpointer>1.13",
"rfc3987",
"strict-rfc3339",
"uritemplate>3.0.0",
"uritemplate>=3.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that the > was failing here, but that's because the patch with this wasn't merged yet (and in fact 3.0.0 doesn't have what we need).

So I think it was correct as-is [and probably even needs some more work once the upstream PR is merged].

Maybe you can chime in upstream with any comments? The PR is python-hyper/uritemplate#36

"webcolors",
],
":python_version=='2.7'": ["functools32"],
Expand Down