diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-07-31 16:42:33 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-07-31 16:42:33 +0000 |
commit | 108b7918b00e4823f9eb3976ec34f46ba7d3db45 (patch) | |
tree | 6f1b8619edb4b6b3d5605ac7d643849f925d04c7 /Lib/test/test_imaplib.py | |
parent | Enable test_socket again, if only to prevent mistakes like Jeremy (diff) | |
download | cpython-108b7918b00e4823f9eb3976ec34f46ba7d3db45.tar.gz cpython-108b7918b00e4823f9eb3976ec34f46ba7d3db45.tar.bz2 cpython-108b7918b00e4823f9eb3976ec34f46ba7d3db45.zip |
Reverting this to rev 1.3. It's apparently broken everywhere at rev
1.6, and pierslauder didn't respond to email about it on Monday.
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r-- | Lib/test/test_imaplib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 33f6f8e7a91..9f5324057a1 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -1,11 +1,11 @@ import imaplib +import time -# Can't use time.time() values, as they are O/S specific +timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), + '"18-May-2033 05:33:20 +0200"', '"18-May-2033 13:33:20 +1000"'] -timevalues = [(2033, 5, 18, 3, 33, 20, 2, 138, 0), '"18-May-2033 13:33:20 +1000"'] +check = timevalues[2] for t in timevalues: - t1 = imaplib.Time2Internaldate(t) - t2 = imaplib.Time2Internaldate(imaplib.Internaldate2tuple('INTERNALDATE ' + t1)) - if t1 <> t2: + if check <> imaplib.Internaldate2tuple('INTERNALDATE ' + imaplib.Time2Internaldate(t)): print 'incorrect result when converting', `t` |