summaryrefslogtreecommitdiff
path: root/jsonschema
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-08-24 12:31:13 +0100
committerJulian Berman <Julian@GrayVines.com>2021-08-24 12:31:13 +0100
commited887ced96e26d674b007899a7f86eb4932d8a6c (patch)
tree744249e6f4bdecdb3048e56a8f3244ebb6abf09e /jsonschema
parent53694e776adfc0b3f8b49101d1477f091c1dc0d9 (diff)
downloadjsonschema-ed887ced96e26d674b007899a7f86eb4932d8a6c.tar.gz
Unskip more passing tests.
Diffstat (limited to 'jsonschema')
-rw-r--r--jsonschema/tests/test_jsonschema_test_suite.py102
1 files changed, 16 insertions, 86 deletions
diff --git a/jsonschema/tests/test_jsonschema_test_suite.py b/jsonschema/tests/test_jsonschema_test_suite.py
index 0d037b6..fda273d 100644
--- a/jsonschema/tests/test_jsonschema_test_suite.py
+++ b/jsonschema/tests/test_jsonschema_test_suite.py
@@ -110,13 +110,18 @@ else:
def missing_date_fromisoformat(test):
return
-allowed_leading_zeros = skip(
- message="This behavior is optional (and Python allows it)",
- subject="ipv4",
- description=(
- "leading zeroes should be rejected, as they are treated as octals"
- ),
-)
+if sys.version_info < (3, 9):
+ message = "Rejecting leading zeros is 3.9+"
+ allowed_leading_zeros = skip(
+ message=message,
+ subject="ipv4",
+ description=(
+ "leading zeroes should be rejected, as they are treated as octals"
+ ),
+ )
+else:
+ def allowed_leading_zeros(test):
+ return
def leap_second(test):
@@ -147,6 +152,9 @@ TestDraft3 = DRAFT3.to_unittest_testcase(
or skip(
message=bug(371),
subject="ref",
+ description=(
+ "$ref resolves to /definitions/foo, data does not validate"
+ ),
case_description=(
"$ref prevents a sibling id from changing the base uri"
),
@@ -228,7 +236,7 @@ TestDraft6 = DRAFT6.to_unittest_testcase(
DRAFT6.optional_tests_of(name="bignum"),
DRAFT6.optional_tests_of(name="float-overflow"),
DRAFT6.optional_tests_of(name="non-bmp-regex"),
- DRAFT7.optional_tests_of(name="unicode"),
+ DRAFT6.optional_tests_of(name="unicode"),
Validator=Draft6Validator,
format_checker=draft6_format_checker,
skip=lambda test: (
@@ -238,11 +246,6 @@ TestDraft6 = DRAFT6.to_unittest_testcase(
or missing_format(draft6_format_checker)(test)
or complex_email_validation(test)
or skip(
- message=bug(),
- subject="ref",
- case_description="Recursive references between schemas",
- )(test)
- or skip(
message=bug(371),
subject="ref",
case_description="Location-independent identifier",
@@ -263,40 +266,6 @@ TestDraft6 = DRAFT6.to_unittest_testcase(
),
)(test)
or skip(
- message=bug(371),
- subject="ref",
- case_description="refs with relative uris and defs",
- )(test)
- or skip(
- message=bug(371),
- subject="ref",
- case_description="relative refs with absolute uris and defs",
- )(test)
- or skip(
- message=bug(371),
- subject="ref",
- case_description=(
- "$ref prevents a sibling $id from changing the base uri"
- ),
- )(test)
- or skip(
- message=bug(371),
- subject="id",
- description="match $ref to id",
- )(test)
- or skip(
- message=bug(371),
- subject="id",
- description="no match on enum or $ref to id",
- )(test)
- or skip(
- message=bug(),
- subject="unknownKeyword",
- case_description=(
- "$id inside an unknown keyword is not a real identifier"
- ),
- )(test)
- or skip(
message=bug(),
subject="refRemote",
case_description="base URI change - change folder in subschema",
@@ -323,11 +292,6 @@ TestDraft7 = DRAFT7.to_unittest_testcase(
or missing_format(draft7_format_checker)(test)
or complex_email_validation(test)
or skip(
- message=bug(),
- subject="ref",
- case_description="Recursive references between schemas",
- )(test)
- or skip(
message=bug(371),
subject="ref",
case_description="Location-independent identifier",
@@ -348,40 +312,6 @@ TestDraft7 = DRAFT7.to_unittest_testcase(
),
)(test)
or skip(
- message=bug(371),
- subject="ref",
- case_description="refs with relative uris and defs",
- )(test)
- or skip(
- message=bug(371),
- subject="ref",
- case_description="relative refs with absolute uris and defs",
- )(test)
- or skip(
- message=bug(371),
- subject="ref",
- case_description=(
- "$ref prevents a sibling $id from changing the base uri"
- ),
- )(test)
- or skip(
- message=bug(371),
- subject="id",
- description="match $ref to id",
- )(test)
- or skip(
- message=bug(371),
- subject="id",
- description="no match on enum or $ref to id",
- )(test)
- or skip(
- message=bug(),
- subject="unknownKeyword",
- case_description=(
- "$id inside an unknown keyword is not a real identifier"
- ),
- )(test)
- or skip(
message=bug(),
subject="refRemote",
case_description="base URI change - change folder in subschema",