~malept/ubuntu/lucid/python2.6/dev-dependency-fix

« back to all changes in this revision

Viewing changes to Lib/test/test_imaplib.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-13 12:51:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090213125100-uufgcb9yeqzujpqw
Tags: upstream-2.6.1
ImportĀ upstreamĀ versionĀ 2.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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()