diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-01-29 18:43:43 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-01-29 18:43:43 (GMT) |
commit | 87bb6e9b2f448d5e34e1e841d59bc5e4c20039bd (patch) | |
tree | b05fb1da6388f23e634e41e7176f13c63b2717ee /Lib/test/test_imaplib.py | |
parent | 7376c996d5a50a1d2bd7072861400278524d5f20 (diff) | |
download | cpython-87bb6e9b2f448d5e34e1e841d59bc5e4c20039bd.zip cpython-87bb6e9b2f448d5e34e1e841d59bc5e4c20039bd.tar.gz cpython-87bb6e9b2f448d5e34e1e841d59bc5e4c20039bd.tar.bz2 |
Merged revisions 88231 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88231 | alexander.belopolsky | 2011-01-29 12:19:08 -0500 (Sat, 29 Jan 2011) | 4 lines
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.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 1ab28c5..39984c5 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -26,6 +26,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 |