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.
This commit is contained in:
Victor Stinner 2018-11-27 12:40:50 +01:00 committed by GitHub
parent 62be74290a
commit cfaafda8e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,3 @@
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.