Skip to content

Commit 10c2dd2

Browse files
committed
Issue python#24773: Skip system tests for transitions in year 2037 and later.
1 parent 3f63483 commit 10c2dd2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Lib/test/datetimetester.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,9 +4766,11 @@ def test_system_transitions(self):
47664766
try:
47674767
_time.tzset()
47684768
for udt, shift in tz.transitions():
4769-
if (self.zonename == 'Europe/Tallinn' and udt.date() == date(1999, 10, 31) or
4770-
self.zonename.endswith(('Casablanca', 'El_Aaiun')) and
4771-
udt.date() == date(2037, 10, 4)):
4769+
if udt.year >= 2037:
4770+
# System support for times around the end of 32-bit time_t
4771+
# and later is flaky on many systems.
4772+
break
4773+
if self.zonename == 'Europe/Tallinn' and udt.date() == date(1999, 10, 31):
47724774
print("Skip %s %s transition" % (self.zonename, udt))
47734775
continue
47744776
s0 = (udt - datetime(1970, 1, 1)) // SEC

0 commit comments

Comments
 (0)