summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-27 11:40:50 (GMT)
committerGitHub <noreply@github.com>2018-11-27 11:40:50 (GMT)
commitcfaafda8e3e19764682abb4bd4c574accb784c42 (patch)
treed2b5f9cf4a9de5e99193173228cb0111af27c139 /Lib/test
parent62be74290aca26d16f3f55ece7ff6dad14e60e8d (diff)
downloadcpython-cfaafda8e3e19764682abb4bd4c574accb784c42.zip
cpython-cfaafda8e3e19764682abb4bd4c574accb784c42.tar.gz
cpython-cfaafda8e3e19764682abb4bd4c574accb784c42.tar.bz2
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.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py
index 6dcb3bb..4e3c3f3 100644
--- a/Lib/test/test_email/test_utils.py
+++ b/Lib/test/test_email/test_utils.py
@@ -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)