Back to index

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

List of all members.

Public Member Functions

def test_dict
def test_list
def test_tuple
def test_sets
def helper

Static Public Attributes

dictionary d

Detailed Description

Definition at line 116 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 127 of file test_marshal.py.

00127 
00128     def test_dict(self):
00129         self.helper(self.d)

Here is the call graph for this function:

Definition at line 130 of file test_marshal.py.

00130 
00131     def test_list(self):
00132         self.helper(list(self.d.items()))

Here is the call graph for this function:

Definition at line 136 of file test_marshal.py.

00136 
00137     def test_sets(self):
00138         for constructor in (set, frozenset):
00139             self.helper(constructor(self.d.keys()))

Here is the call graph for this function:

Definition at line 133 of file test_marshal.py.

00133 
00134     def test_tuple(self):
00135         self.helper(tuple(self.d.keys()))

Here is the call graph for this function:


Member Data Documentation

Initial value:
{'astring': 'foo@bar.baz.spam',
         'afloat': 7283.43,
         'anint': 2**20,
         'ashortlong': 2,
         'alist': ['.zyx.41'],
         'atuple': ('.zyx.41',)*10,
         'aboolean': False,
         'aunicode': "Andr\xe8 Previn"
         }

Definition at line 117 of file test_marshal.py.


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