Back to index

python3.2  3.2.2
Public Member Functions
test.test_marshal.StringTestCase Class Reference
Inheritance diagram for test.test_marshal.StringTestCase:
Inheritance graph
[legend]
Collaboration diagram for test.test_marshal.StringTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_unicode
def test_string
def test_bytes
def helper

Detailed Description

Definition at line 86 of file test_marshal.py.


Member Function Documentation

def test.test_marshal.HelperMixin.helper (   self,
  sample,
  extra 
) [inherited]

Definition at line 10 of file test_marshal.py.

00010 
00011     def helper(self, sample, *extra):
00012         new = marshal.loads(marshal.dumps(sample, *extra))
00013         self.assertEqual(sample, new)
00014         try:
00015             with open(support.TESTFN, "wb") as f:
00016                 marshal.dump(sample, f, *extra)
00017             with open(support.TESTFN, "rb") as f:
00018                 new = marshal.load(f)
00019             self.assertEqual(sample, new)
00020         finally:
00021             support.unlink(support.TESTFN)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 95 of file test_marshal.py.

00095 
00096     def test_bytes(self):
00097         for s in [b"", b"Andr\xe8 Previn", b"abc", b" "*10000]:
00098             self.helper(s)

Here is the call graph for this function:

Definition at line 91 of file test_marshal.py.

00091 
00092     def test_string(self):
00093         for s in ["", "Andr\xe8 Previn", "abc", " "*10000]:
00094             self.helper(s)

Here is the call graph for this function:

Definition at line 87 of file test_marshal.py.

00087 
00088     def test_unicode(self):
00089         for s in ["", "Andr\xe8 Previn", "abc", " "*10000]:
00090             self.helper(marshal.loads(marshal.dumps(s)))

Here is the call graph for this function:


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