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

Ensure all elements of arrays are verified for uniqueness #875

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion jsonschema/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def uniq(container):
sliced = itertools.islice(sort, 1, None)

for i, j in zip(sort, sliced):
return not _sequence_equal(i, j)
if _sequence_equal(i, j):
return False

except (NotImplementedError, TypeError):
seen = []
Expand Down
60 changes: 0 additions & 60 deletions jsonschema/tests/test_jsonschema_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,6 @@ def leap_second(test):
narrow_unicode_build(test)
or missing_format(draft3_format_checker)(test)
or complex_email_validation(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message=bug(371),
subject="ref",
Expand All @@ -200,16 +190,6 @@ def leap_second(test):
or leap_second(test)
or missing_format(draft4_format_checker)(test)
or complex_email_validation(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message=bug(),
subject="ref",
Expand Down Expand Up @@ -271,16 +251,6 @@ def leap_second(test):
or leap_second(test)
or missing_format(draft6_format_checker)(test)
or complex_email_validation(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message=bug(371),
subject="ref",
Expand Down Expand Up @@ -320,16 +290,6 @@ def leap_second(test):
or leap_second(test)
or missing_format(draft7_format_checker)(test)
or complex_email_validation(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message=bug(371),
subject="ref",
Expand Down Expand Up @@ -396,16 +356,6 @@ def leap_second(test):
message="unevaluatedItems is different in 2019-09 (needs work).",
subject="unevaluatedItems",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message="dynamicRef support isn't working yet.",
subject="recursiveRef",
Expand Down Expand Up @@ -450,16 +400,6 @@ def leap_second(test):
Validator=Draft202012Validator,
skip=lambda test: (
narrow_unicode_build(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of more than two arrays is invalid",
)(test)
or skip(
message=bug(866),
subject="uniqueItems",
description="non-unique array of strings is invalid",
)(test)
or skip(
message="dynamicRef support isn't working yet.",
subject="dynamicRef",
Expand Down