summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 00:57:39 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 00:57:39 (GMT)
commite99d3a160ca622fff737a0f835f78e2c4705f9cc (patch)
tree927a11ff40ff2fb04896a067613362a29eca5bdb /Lib/email/test/test_email.py
parent9bd4bf2a3d0426ee3830e89854ecf4bea03ac830 (diff)
downloadcpython-e99d3a160ca622fff737a0f835f78e2c4705f9cc.zip
cpython-e99d3a160ca622fff737a0f835f78e2c4705f9cc.tar.gz
cpython-e99d3a160ca622fff737a0f835f78e2c4705f9cc.tar.bz2
Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r--Lib/email/test/test_email.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 5c9a725..d86bfd1 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -2262,6 +2262,12 @@ class TestMiscellaneous(TestEmailBase):
eq(time.localtime(t)[:6], timetup[:6])
eq(int(time.strftime('%Y', timetup[:9])), 2003)
+ def test_mktime_tz(self):
+ self.assertEqual(utils.mktime_tz((1970, 1, 1, 0, 0, 0,
+ -1, -1, -1, 0)), 0)
+ self.assertEqual(utils.mktime_tz((1970, 1, 1, 0, 0, 0,
+ -1, -1, -1, 1234)), -1234)
+
def test_parsedate_y2k(self):
"""Test for parsing a date with a two-digit year.