diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-27 12:01:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 12:01:00 (GMT) |
commit | b59fc311609aadaafaae68240127b4997b85859d (patch) | |
tree | a7ec38bcd1e0e2e7712dbcc1408a096675ee2ef4 | |
parent | 7f93f93fa68f54c1bc128d58fa17536245396de3 (diff) | |
download | cpython-b59fc311609aadaafaae68240127b4997b85859d.zip cpython-b59fc311609aadaafaae68240127b4997b85859d.tar.gz cpython-b59fc311609aadaafaae68240127b4997b85859d.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.
(cherry picked from commit cfaafda8e3e19764682abb4bd4c574accb784c42)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
-rw-r--r-- | Lib/test/test_email/test_utils.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst | 3 |
2 files changed, 5 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) diff --git a/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst b/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst new file mode 100644 index 0000000..73a30f7 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst @@ -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. |