diff options
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r-- | Lib/test/test_copy.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index 3d44304..6e32ddd 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -272,10 +272,10 @@ class TestCopy(unittest.TestCase): x = [] x.append(x) y = copy.deepcopy(x) - self.assertEqual(y, x) + self.assertRaises(RuntimeError, cmp, y, x) self.assert_(y is not x) - self.assert_(y[0] is not x[0]) - self.assert_(y is y[0]) + self.assert_(y[0] is y) + self.assertEqual(len(y), 1) def test_deepcopy_tuple(self): x = ([1, 2], 3) @@ -288,7 +288,7 @@ class TestCopy(unittest.TestCase): x = ([],) x[0].append(x) y = copy.deepcopy(x) - self.assertEqual(y, x) + self.assertRaises(RuntimeError, cmp, y, x) self.assert_(y is not x) self.assert_(y[0] is not x[0]) self.assert_(y[0][0] is y) @@ -304,10 +304,10 @@ class TestCopy(unittest.TestCase): x = {} x['foo'] = x y = copy.deepcopy(x) - self.assertEqual(y, x) + self.assertRaises(RuntimeError, cmp, y, x) self.assert_(y is not x) self.assert_(y['foo'] is y) - self.assertEqual(y, {'foo': y}) + self.assertEqual(len(y), 1) def test_deepcopy_keepalive(self): memo = {} |