summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-04-28 09:35:17 -0400
committerJulian Berman <Julian@GrayVines.com>2021-04-28 09:35:23 -0400
commit07852883831e388ca87cc31d53b9ec7d2b4c7a7f (patch)
treeb6d85aede75687e82a3f263ac6163e1c572c93a8
parent783d81d5ef41ddda7681bd63f6fb7ce05ef3d8d8 (diff)
downloadjsonschema-07852883831e388ca87cc31d53b9ec7d2b4c7a7f.tar.gz
Unsupport leap seconds.
It's unclear to me yet what to do here. Upstream we seem to read that these should be valid, but in particular, strict-rfc3339 doesn't support them because they'd require up to date tzdata.
-rw-r--r--jsonschema/tests/test_jsonschema_test_suite.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/jsonschema/tests/test_jsonschema_test_suite.py b/jsonschema/tests/test_jsonschema_test_suite.py
index 6ddb5d6..432923a 100644
--- a/jsonschema/tests/test_jsonschema_test_suite.py
+++ b/jsonschema/tests/test_jsonschema_test_suite.py
@@ -114,6 +114,17 @@ allowed_leading_zeros = skip(
),
)
+def leap_second(test):
+ return skip(
+ message="Leap seconds are unsupported.",
+ subject="time",
+ description="a valid time string with leap second",
+ )(test) or skip(
+ message="Leap seconds are unsupported.",
+ subject="time",
+ description="a valid time string with leap second with offset",
+ )(test)
+
TestDraft3 = DRAFT3.to_unittest_testcase(
DRAFT3.tests(),
@@ -369,6 +380,7 @@ TestDraft7 = DRAFT7.to_unittest_testcase(
narrow_unicode_build(test)
or missing_date_fromisoformat(test)
or allowed_leading_zeros(test)
+ or leap_second(test)
or missing_format(draft7_format_checker)(test)
or complex_email_validation(test)
or skip(