summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index d3fa753..40a457c 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -69,7 +69,7 @@ class TestModule(unittest.TestCase):
if not name.startswith('__') and not name.endswith('__'))
allowed = set(['MAXYEAR', 'MINYEAR', 'date', 'datetime',
'datetime_CAPI', 'time', 'timedelta', 'timezone',
- 'tzinfo'])
+ 'tzinfo', 'sys'])
self.assertEqual(names - allowed, set([]))
def test_divide_and_round(self):
@@ -4423,6 +4423,10 @@ class TestLocalTimeDisambiguation(unittest.TestCase):
self.assertEqual(t0.fold, 0)
self.assertEqual(t1.fold, 1)
+ def test_fromtimestamp_low_fold_detection(self):
+ # Ensure that fold detection doesn't cause an
+ # OSError for really low values, see bpo-29097
+ self.assertEqual(datetime.fromtimestamp(0).fold, 0)
@support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
def test_timestamp(self):