Back to index

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

List of all members.

Public Member Functions

def setUp
def test_copy
def test_deep_copy

Public Attributes

 set

Detailed Description

Definition at line 1496 of file test_set.py.


Member Function Documentation

Definition at line 1497 of file test_set.py.

01497 
01498     def setUp(self):
01499         self.set = set([((1, 2), (3, 4))])
01500 
01501 #==============================================================================

Here is the caller graph for this function:

def test.test_set.TestCopying.test_copy (   self) [inherited]

Definition at line 1453 of file test_set.py.

01453 
01454     def test_copy(self):
01455         dup = self.set.copy()
01456         dup_list = sorted(dup, key=repr)
01457         set_list = sorted(self.set, key=repr)
01458         self.assertEqual(len(dup_list), len(set_list))
01459         for i in range(len(dup_list)):
01460             self.assertTrue(dup_list[i] is set_list[i])

Here is the call graph for this function:

def test.test_set.TestCopying.test_deep_copy (   self) [inherited]

Definition at line 1461 of file test_set.py.

01461 
01462     def test_deep_copy(self):
01463         dup = copy.deepcopy(self.set)
01464         ##print type(dup), repr(dup)
01465         dup_list = sorted(dup, key=repr)
01466         set_list = sorted(self.set, key=repr)
01467         self.assertEqual(len(dup_list), len(set_list))
01468         for i in range(len(dup_list)):
01469             self.assertEqual(dup_list[i], set_list[i])
01470 
01471 #------------------------------------------------------------------------------

Here is the call graph for this function:


Member Data Documentation

Definition at line 1498 of file test_set.py.


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