summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
diff options
context:
space:
mode:
authorPiers Lauder <piers@cs.su.oz.au>2002-07-27 00:38:30 (GMT)
committerPiers Lauder <piers@cs.su.oz.au>2002-07-27 00:38:30 (GMT)
commit385a77acad94f66fac8bf0375f1d1264e118598e (patch)
tree10ae7258bfd349c7758813672b1cbdb057baa63c /Lib/test/test_imaplib.py
parent35b37a5c11987a00d925042b157fe1e81739ba08 (diff)
downloadcpython-385a77acad94f66fac8bf0375f1d1264e118598e.zip
cpython-385a77acad94f66fac8bf0375f1d1264e118598e.tar.gz
cpython-385a77acad94f66fac8bf0375f1d1264e118598e.tar.bz2
remove o/s dependancy from test
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r--Lib/test/test_imaplib.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index 9f53240..04601da 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -1,11 +1,12 @@
import imaplib
import time
-timevalues = [2000000000, 2000000000.0, time.localtime(2000000000),
- '"18-May-2033 05:33:20 +0200"', '"18-May-2033 13:33:20 +1000"']
+# Can't use time.time() values, as they are O/S specific
-check = timevalues[2]
+timevalues = [(2033, 5, 18, 3, 33, 20, 2, 138, 0), '"18-May-2033 13:33:20 +1000"']
for t in timevalues:
- if check <> imaplib.Internaldate2tuple('INTERNALDATE ' + imaplib.Time2Internaldate(t)):
+ t1 = imaplib.Time2Internaldate(t)
+ t2 = imaplib.Time2Internaldate(imaplib.Internaldate2tuple('INTERNALDATE ' + imaplib.Time2Internaldate(t)))
+ if t1 <> t2:
print 'incorrect result when converting', `t`