diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 10:45:28 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 10:45:28 (GMT) |
commit | 07547cdad30c53a488226b5f7d7271b9ddff16c5 (patch) | |
tree | 29bbd8dda85afff4a236b2e2078d74e5b6cf7239 | |
parent | 05e218c37d4159c2d9d70509d4c7a9b2405788f9 (diff) | |
parent | 6f37e3645df5ef1820f3b9d21a0ebed7592d7edc (diff) | |
download | cpython-07547cdad30c53a488226b5f7d7271b9ddff16c5.zip cpython-07547cdad30c53a488226b5f7d7271b9ddff16c5.tar.gz cpython-07547cdad30c53a488226b5f7d7271b9ddff16c5.tar.bz2 |
Merge 3.6
-rw-r--r-- | Lib/test/datetimetester.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 7feabce..42944a2 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -1993,9 +1993,13 @@ class TestDateTime(TestDate): # minimum timestamp min_dt = self.theclass.min.replace(tzinfo=timezone.utc) min_ts = min_dt.timestamp() - # date 0001-01-01 00:00:00+00:00: timestamp=-62135596800 - self.assertEqual(self.theclass.fromtimestamp(min_ts, tz=timezone.utc), - min_dt) + try: + # date 0001-01-01 00:00:00+00:00: timestamp=-62135596800 + self.assertEqual(self.theclass.fromtimestamp(min_ts, tz=timezone.utc), + min_dt) + except OverflowError as exc: + # the date 0001-01-01 doesn't fit into 32-bit time_t + self.skipTest(str(exc)) # maximum timestamp: set seconds to zero to avoid rounding issues max_dt = self.theclass.max.replace(tzinfo=timezone.utc, |