Back to index

python3.2  3.2.2
Public Member Functions
test.test_imaplib.TestImaplib Class Reference

List of all members.

Public Member Functions

def test_Internaldate2tuple
def test_that_Time2Internaldate_returns_a_result

Detailed Description

Definition at line 25 of file test_imaplib.py.


Member Function Documentation

Definition at line 27 of file test_imaplib.py.

00027 
00028     def test_Internaldate2tuple(self):
00029         t0 = calendar.timegm((2000, 1, 1, 0, 0, 0, -1, -1, -1))
00030         tt = imaplib.Internaldate2tuple(
00031             b'25 (INTERNALDATE "01-Jan-2000 00:00:00 +0000")')
00032         self.assertEqual(time.mktime(tt), t0)
00033         tt = imaplib.Internaldate2tuple(
00034             b'25 (INTERNALDATE "01-Jan-2000 11:30:00 +1130")')
00035         self.assertEqual(time.mktime(tt), t0)
00036         tt = imaplib.Internaldate2tuple(
00037             b'25 (INTERNALDATE "31-Dec-1999 12:30:00 -1130")')
00038         self.assertEqual(time.mktime(tt), t0)

Here is the call graph for this function:

Definition at line 39 of file test_imaplib.py.

00039 
00040     def test_that_Time2Internaldate_returns_a_result(self):
00041         # We can check only that it successfully produces a result,
00042         # not the correctness of the result itself, since the result
00043         # depends on the timezone the machine is in.
00044         timevalues = [2000000000, 2000000000.0, time.localtime(2000000000),
00045                       '"18-May-2033 05:33:20 +0200"']
00046 
00047         for t in timevalues:
00048             imaplib.Time2Internaldate(t)
00049 

Here is the call graph for this function:


The documentation for this class was generated from the following file: