Back to index

python3.2  3.2.2
Private Member Functions
test.test_mailbox.TestBase Class Reference
Inheritance diagram for test.test_mailbox.TestBase:
Inheritance graph

List of all members.

Private Member Functions

def _check_sample
def _delete_recursively

Detailed Description

Definition at line 22 of file

Member Function Documentation

def test.test_mailbox.TestBase._check_sample (   self,
) [private]

Definition at line 24 of file

00025     def _check_sample(self, msg):
00026         # Inspect a mailbox.Message representation of the sample message
00027         self.assertIsInstance(msg, email.message.Message)
00028         self.assertIsInstance(msg, mailbox.Message)
00029         for key, value in _sample_headers.items():
00030             self.assertIn(value, msg.get_all(key))
00031         self.assertTrue(msg.is_multipart())
00032         self.assertEqual(len(msg.get_payload()), len(_sample_payloads))
00033         for i, payload in enumerate(_sample_payloads):
00034             part = msg.get_payload(i)
00035             self.assertIsInstance(part, email.message.Message)
00036             self.assertNotIsInstance(part, mailbox.Message)
00037             self.assertEqual(part.get_payload(), payload)

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_mailbox.TestBase._delete_recursively (   self,
) [private]

Definition at line 38 of file

00039     def _delete_recursively(self, target):
00040         # Delete a file or delete a directory recursively
00041         if os.path.isdir(target):
00042             for path, dirs, files in os.walk(target, topdown=False):
00043                 for name in files:
00044                     os.remove(os.path.join(path, name))
00045                 for name in dirs:
00046                     os.rmdir(os.path.join(path, name))
00047             os.rmdir(target)
00048         elif os.path.exists(target):
00049             os.remove(target)

Here is the call graph for this function:

Here is the caller graph for this function:

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