Skip to content

Commit

Permalink
xfails for leap seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
hudson-ai committed Sep 12, 2024
1 parent 2e6a3b3 commit e0c32a5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/unit/library/test_json_stringformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,20 +483,20 @@ def test_good(self, target_str):
'"008:030:006Z"', # invalid time string with extra leading zeros
'"8:3:6Z"', # invalid time string with no leading zero for single digit
'"8:0030:6Z"', # hour, minute, second must be two digits
'"22:59:60Z"', # invalid leap second, Zulu (wrong hour)
'"23:58:60Z"', # invalid leap second, Zulu (wrong minute)
'"22:59:60+00:00"', # invalid leap second, zero time-offset (wrong hour)
'"23:58:60+00:00"', # invalid leap second, zero time-offset (wrong minute)
'"23:59:60+01:00"', # invalid leap second, positive time-offset (wrong hour)
'"23:59:60+00:30"', # invalid leap second, positive time-offset (wrong minute)
'"23:59:60-01:00"', # invalid leap second, negative time-offset (wrong hour)
'"23:59:60-00:30"', # invalid leap second, negative time-offset (wrong minute)
pytest.param('"22:59:60Z"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, Zulu (wrong hour)
pytest.param('"23:58:60Z"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, Zulu (wrong minute)
pytest.param('"22:59:60+00:00"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, zero time-offset (wrong hour)
pytest.param('"23:58:60+00:00"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, zero time-offset (wrong minute)
pytest.param('"23:59:60+01:00"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, positive time-offset (wrong hour)
pytest.param('"23:59:60+00:30"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, positive time-offset (wrong minute)
pytest.param('"23:59:60-01:00"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, negative time-offset (wrong hour)
pytest.param('"23:59:60-00:30"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # invalid leap second, negative time-offset (wrong minute)
'"08:30:06-8:000"', # hour, minute in time-offset must be two digits
'"24:00:00Z"', # an invalid time string with invalid hour
'"00:60:00Z"', # an invalid time string with invalid minute
'"00:00:61Z"', # an invalid time string with invalid second
'"22:59:60Z"', # an invalid time string with invalid leap second (wrong hour)
'"23:58:60Z"', # an invalid time string with invalid leap second (wrong minute)
pytest.param('"22:59:60Z"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # an invalid time string with invalid leap second (wrong hour)
pytest.param('"23:58:60Z"', marks=pytest.mark.xfail(reason="leap seconds are hard")), # an invalid time string with invalid leap second (wrong minute)
'"01:02:03+24:00"', # an invalid time string with invalid time numoffset hour
'"01:02:03+00:60"', # an invalid time string with invalid time numoffset minute
'"01:02:03Z+00:30"', # an invalid time string with invalid time with both Z and numoffset
Expand Down

0 comments on commit e0c32a5

Please sign in to comment.