home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 July / maximum-cd-2011-07.iso / DiscContents / LibO_3.3.2_Win_x86_install_multi.exe / libreoffice1.cab / test_imaplib.py < prev    next >
Encoding:
Python Source  |  2011-03-15  |  676 b   |  26 lines

  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()
  26.