symbian-qemu-0.9.1-12/python-2.6.1/Lib/test/test_imaplib.py
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 import imaplib
       
     2 import time
       
     3 
       
     4 from test import test_support
       
     5 import unittest
       
     6 
       
     7 
       
     8 class TestImaplib(unittest.TestCase):
       
     9     def test_that_Time2Internaldate_returns_a_result(self):
       
    10         # We can check only that it successfully produces a result,
       
    11         # not the correctness of the result itself, since the result
       
    12         # depends on the timezone the machine is in.
       
    13         timevalues = [2000000000, 2000000000.0, time.localtime(2000000000),
       
    14                       '"18-May-2033 05:33:20 +0200"']
       
    15 
       
    16         for t in timevalues:
       
    17             imaplib.Time2Internaldate(t)
       
    18 
       
    19 
       
    20 def test_main():
       
    21     test_support.run_unittest(TestImaplib)
       
    22 
       
    23 
       
    24 if __name__ == "__main__":
       
    25     unittest.main()