cpython/Lib/test/test_imaplib.py

13 lines
411 B
Python
Raw Normal View History

import imaplib
import time
2002-07-27 00:38:30 +00:00
# Can't use time.time() values, as they are O/S specific
2002-07-27 00:38:30 +00:00
timevalues = [(2033, 5, 18, 3, 33, 20, 2, 138, 0), '"18-May-2033 13:33:20 +1000"']
for t in timevalues:
2002-07-27 00:38:30 +00:00
t1 = imaplib.Time2Internaldate(t)
t2 = imaplib.Time2Internaldate(imaplib.Internaldate2tuple('INTERNALDATE ' + imaplib.Time2Internaldate(t)))
if t1 <> t2:
print 'incorrect result when converting', `t`