Commit cfaafda8 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-35317: Fix mktime() error in test_email (GH-10721)

Fix mktime() overflow error in test_email: run
test_localtime_daylight_true_dst_true() and
test_localtime_daylight_false_dst_true() with a specific timezone.
parent 62be7429
......@@ -75,6 +75,7 @@ class LocaltimeTests(unittest.TestCase):
t2 = utils.localtime(t1)
self.assertEqual(t1, t2)
@test.support.run_with_tz('Europe/Minsk')
def test_localtime_daylight_true_dst_true(self):
test.support.patch(self, time, 'daylight', True)
t0 = datetime.datetime(2012, 3, 12, 1, 1)
......@@ -82,6 +83,7 @@ class LocaltimeTests(unittest.TestCase):
t2 = utils.localtime(t1)
self.assertEqual(t1, t2)
@test.support.run_with_tz('Europe/Minsk')
def test_localtime_daylight_false_dst_true(self):
test.support.patch(self, time, 'daylight', False)
t0 = datetime.datetime(2012, 3, 12, 1, 1)
......
Fix ``mktime()`` overflow error in ``test_email``: run
``test_localtime_daylight_true_dst_true()`` and
``test_localtime_daylight_false_dst_true()`` with a specific timezone.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment