blob: 2105fc2dcfa3f9936f154067b35c4e4fea893938 [file] [log] [blame]
Martin v. Löwisea752fb2002-01-05 11:31:49 +00001import imaplib
Tim Peters108b7912002-07-31 16:42:33 +00002import time
Martin v. Löwisea752fb2002-01-05 11:31:49 +00003
Benjamin Petersonee8712c2008-05-20 21:35:26 +00004from test import support
Christian Heimesf6cd9672008-03-26 13:45:42 +00005import unittest
Piers Lauderf0a70f62002-06-17 07:06:24 +00006
Martin v. Löwisea752fb2002-01-05 11:31:49 +00007
Christian Heimesf6cd9672008-03-26 13:45:42 +00008class 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
20def test_main():
Benjamin Petersonee8712c2008-05-20 21:35:26 +000021 support.run_unittest(TestImaplib)
Christian Heimesf6cd9672008-03-26 13:45:42 +000022
23
24if __name__ == "__main__":
25 unittest.main()