Staging
v0.5.1
swh:1:snp:635f4099902912592851108bcac178ff574f7c5f
Raw File
Tip revision: 43baef41fdf4b448d74fbd88ca738b1f4ddc6670 authored by Barry Warsaw on 21 November 2008, 01:18:21 UTC
Bump to 3.0rc3
Tip revision: 43baef4
test_imaplib.py
import imaplib
import time

from test import support
import unittest


class TestImaplib(unittest.TestCase):
    def test_that_Time2Internaldate_returns_a_result(self):
        # We can check only that it successfully produces a result,
        # not the correctness of the result itself, since the result
        # depends on the timezone the machine is in.
        timevalues = [2000000000, 2000000000.0, time.localtime(2000000000),
                      '"18-May-2033 05:33:20 +0200"']

        for t in timevalues:
            imaplib.Time2Internaldate(t)


def test_main():
    support.run_unittest(TestImaplib)


if __name__ == "__main__":
    unittest.main()
back to top