diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 12:37:21 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 12:37:21 +0100 |
commit | 40cb547717071319838f6064cf351a048e1ab970 (patch) | |
tree | 1ad793ef2ee945c8c0fc552f3d56d1b658318e55 /Lib/test/datetimetester.py | |
parent | e7274193ca5c816cf4c012b2151632bc447f0d0c (diff) | |
download | cpython-3.6.tar.gz |
Fix test_datetime on Windows3.6
Issue #29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with an
OSError in test_timestamp_limits().
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 42944a2d06..2350125f6d 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -1997,8 +1997,9 @@ class TestDateTime(TestDate): # 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 + except (OverflowError, OSError) as exc: + # the date 0001-01-01 doesn't fit into 32-bit time_t, + # or platform doesn't support such very old date self.skipTest(str(exc)) # maximum timestamp: set seconds to zero to avoid rounding issues |