Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes | Private Member Functions
email.test.test_email.BaseTestBytesGeneratorIdempotent Class Reference
Inheritance diagram for email.test.test_email.BaseTestBytesGeneratorIdempotent:
Inheritance graph

List of all members.

Public Member Functions

def assertByteStringsEqual

Static Public Attributes

 maxDiff = None

Private Member Functions

def _msgobj
def _idempotent

Detailed Description

Definition at line 3430 of file

Member Function Documentation

def email.test.test_email.BaseTestBytesGeneratorIdempotent._idempotent (   self,
  unixfrom = False 
) [private]

Definition at line 3441 of file

03442     def _idempotent(self, msg, data, unixfrom=False):
03443         b = BytesIO()
03444         g = email.generator.BytesGenerator(b, maxheaderlen=0)
03445         g.flatten(msg, unixfrom=unixfrom, linesep=self.linesep)
03446         self.assertByteStringsEqual(data, b.getvalue())

Here is the call graph for this function:

def email.test.test_email.BaseTestBytesGeneratorIdempotent._msgobj (   self,
) [private]

Definition at line 3434 of file

03435     def _msgobj(self, filename):
03436         with openfile(filename, 'rb') as fp:
03437             data =
03438         data = self.normalize_linesep_regex.sub(self.blinesep, data)
03439         msg = email.message_from_bytes(data)
03440         return msg, data

Here is the call graph for this function:

Definition at line 3447 of file

03448     def assertByteStringsEqual(self, str1, str2):
03449         # Not using self.blinesep here is intentional.  This way the output
03450         # is more useful when the failure results in mixed line endings.
03451         self.assertListEqual(str1.split(b'\n'), str2.split(b'\n'))

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 3432 of file

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