Back to index

python3.2  3.2.2
Public Member Functions
test.test_set.TestCopying Class Reference
Inheritance diagram for test.test_set.TestCopying:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def test_copy
def test_deep_copy

Detailed Description

Definition at line 1451 of file test_set.py.


Member Function Documentation

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:

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:


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