diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py index e5051ec10..0cfb84fdf 100644 --- a/jsonschema/_utils.py +++ b/jsonschema/_utils.py @@ -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 = [] diff --git a/jsonschema/tests/test_jsonschema_test_suite.py b/jsonschema/tests/test_jsonschema_test_suite.py index 695009dcd..da46cf381 100644 --- a/jsonschema/tests/test_jsonschema_test_suite.py +++ b/jsonschema/tests/test_jsonschema_test_suite.py @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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",