File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1993,9 +1993,13 @@ def test_timestamp_limits(self):
1993
1993
# minimum timestamp
1994
1994
min_dt = self .theclass .min .replace (tzinfo = timezone .utc )
1995
1995
min_ts = min_dt .timestamp ()
1996
- # date 0001-01-01 00:00:00+00:00: timestamp=-62135596800
1997
- self .assertEqual (self .theclass .fromtimestamp (min_ts , tz = timezone .utc ),
1998
- min_dt )
1996
+ try :
1997
+ # date 0001-01-01 00:00:00+00:00: timestamp=-62135596800
1998
+ self .assertEqual (self .theclass .fromtimestamp (min_ts , tz = timezone .utc ),
1999
+ min_dt )
2000
+ except OverflowError as exc :
2001
+ # the date 0001-01-01 doesn't fit into 32-bit time_t
2002
+ self .skipTest (str (exc ))
1999
2003
2000
2004
# maximum timestamp: set seconds to zero to avoid rounding issues
2001
2005
max_dt = self .theclass .max .replace (tzinfo = timezone .utc ,
You can’t perform that action at this time.
0 commit comments