Blame 00315-test_email-mktime.patch

a669008
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
7c14b22
From: Victor Stinner <vstinner@redhat.com>
7c14b22
Date: Tue, 27 Nov 2018 12:40:50 +0100
a669008
Subject: [PATCH] 00315: Fix mktime() error in test_email
7c14b22
7c14b22
Fix mktime() overflow error in test_email: run
7c14b22
test_localtime_daylight_true_dst_true() and
7c14b22
test_localtime_daylight_false_dst_true() with a specific timezone.
7c14b22
a669008
http://bugs.python.org/issue35317
a669008
https://bugzilla.redhat.com/show_bug.cgi?id=1652843
7c14b22
---
7c14b22
 Lib/test/test_email/test_utils.py                              | 2 ++
7c14b22
 .../NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst | 3 +++
7c14b22
 2 files changed, 5 insertions(+)
7c14b22
 create mode 100644 Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst
7c14b22
7c14b22
diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py
a669008
index 6dcb3bbe7a..4e3c3f3a19 100644
7c14b22
--- a/Lib/test/test_email/test_utils.py
7c14b22
+++ b/Lib/test/test_email/test_utils.py
a669008
@@ -75,6 +75,7 @@ class LocaltimeTests(unittest.TestCase):
7c14b22
         t2 = utils.localtime(t1)
7c14b22
         self.assertEqual(t1, t2)
7c14b22
 
7c14b22
+    @test.support.run_with_tz('Europe/Minsk')
7c14b22
     def test_localtime_daylight_true_dst_true(self):
7c14b22
         test.support.patch(self, time, 'daylight', True)
7c14b22
         t0 = datetime.datetime(2012, 3, 12, 1, 1)
a669008
@@ -82,6 +83,7 @@ class LocaltimeTests(unittest.TestCase):
7c14b22
         t2 = utils.localtime(t1)
7c14b22
         self.assertEqual(t1, t2)
7c14b22
 
7c14b22
+    @test.support.run_with_tz('Europe/Minsk')
7c14b22
     def test_localtime_daylight_false_dst_true(self):
7c14b22
         test.support.patch(self, time, 'daylight', False)
7c14b22
         t0 = datetime.datetime(2012, 3, 12, 1, 1)
7c14b22
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
7c14b22
new file mode 100644
a669008
index 0000000000..73a30f7192
7c14b22
--- /dev/null
7c14b22
+++ b/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst
7c14b22
@@ -0,0 +1,3 @@
7c14b22
+Fix ``mktime()`` overflow error in ``test_email``: run
7c14b22
+``test_localtime_daylight_true_dst_true()`` and
7c14b22
+``test_localtime_daylight_false_dst_true()`` with a specific timezone.