summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-29 17:19:08 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-01-29 17:19:08 (GMT)
commit19e0a9e5111fc4ef16d6b51a61f099a18c0b3b20 (patch)
tree0afc3eb7068e7c1bfcf5df46a30ef7613de4e0fc /Lib/test/test_imaplib.py
parentac039aee4db2adceac60132eefd46b5fd431238b (diff)
downloadcpython-19e0a9e5111fc4ef16d6b51a61f099a18c0b3b20.zip
cpython-19e0a9e5111fc4ef16d6b51a61f099a18c0b3b20.tar.gz
cpython-19e0a9e5111fc4ef16d6b51a61f099a18c0b3b20.tar.bz2
Issue #10939: Fixed imaplib.Internaldate2tuple(). Thanks Joe Peterson
for the report and the patch. Reviewed by Georg Brandl.
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r--Lib/test/test_imaplib.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index acb89e3..bad4d19 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -23,6 +23,17 @@ CERTFILE = None
class TestImaplib(unittest.TestCase):
+ def test_Internaldate2tuple(self):
+ tt = imaplib.Internaldate2tuple(
+ b'25 (INTERNALDATE "01-Jan-1970 00:00:00 +0000")')
+ self.assertEqual(time.mktime(tt), 0)
+ tt = imaplib.Internaldate2tuple(
+ b'25 (INTERNALDATE "01-Jan-1970 11:30:00 +1130")')
+ self.assertEqual(time.mktime(tt), 0)
+ tt = imaplib.Internaldate2tuple(
+ b'25 (INTERNALDATE "31-Dec-1969 12:30:00 -1130")')
+ self.assertEqual(time.mktime(tt), 0)
+
def test_that_Time2Internaldate_returns_a_result(self):
# We can check only that it successfully produces a result,
# not the correctness of the result itself, since the result