Skip to content

Commit 0785288

Browse files
committed
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.
1 parent 783d81d commit 0785288

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

jsonschema/tests/test_jsonschema_test_suite.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ def missing_date_fromisoformat(test):
114114
),
115115
)
116116

117+
def leap_second(test):
118+
return skip(
119+
message="Leap seconds are unsupported.",
120+
subject="time",
121+
description="a valid time string with leap second",
122+
)(test) or skip(
123+
message="Leap seconds are unsupported.",
124+
subject="time",
125+
description="a valid time string with leap second with offset",
126+
)(test)
127+
117128

118129
TestDraft3 = DRAFT3.to_unittest_testcase(
119130
DRAFT3.tests(),
@@ -369,6 +380,7 @@ def missing_date_fromisoformat(test):
369380
narrow_unicode_build(test)
370381
or missing_date_fromisoformat(test)
371382
or allowed_leading_zeros(test)
383+
or leap_second(test)
372384
or missing_format(draft7_format_checker)(test)
373385
or complex_email_validation(test)
374386
or skip(

0 commit comments

Comments
 (0)