[Python-checkins] cpython (merge 3.6 -> default): Merge 3.6
victor.stinner
python-checkins at python.org
Fri Feb 10 05:45:49 EST 2017
https://hg.python.org/cpython/rev/a60a9bc02d1d
changeset: 106491:a60a9bc02d1d
parent: 106489:ab25f53c5c25
parent: 106490:1c6b87b07586
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Feb 10 11:45:28 2017 +0100
summary:
Merge 3.6
files:
Lib/test/datetimetester.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -1993,9 +1993,13 @@
# 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,
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list