summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 00:48:23 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 00:48:23 (GMT)
commit76935b9c8cc083f4d00bee3b8f0c76054dd31013 (patch)
tree98f6ece8d6a3a7d582c76b209c1c943719fc3db0 /Lib/test
parent2180c97a0055c8c2f6f2cf0754bfb650d7cc0f34 (diff)
parenta07548e97bd819884ed1ddcfedb0fcbcbfdc58fe (diff)
downloadcpython-76935b9c8cc083f4d00bee3b8f0c76054dd31013.zip
cpython-76935b9c8cc083f4d00bee3b8f0c76054dd31013.tar.gz
cpython-76935b9c8cc083f4d00bee3b8f0c76054dd31013.tar.bz2
Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_email.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index 5aefc47..8cc2da0 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -2722,6 +2722,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.