]> granicus.if.org Git - python/commitdiff
rewrite with assertIs
authorBenjamin Peterson <benjamin@python.org>
Fri, 25 Feb 2011 14:05:42 +0000 (14:05 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 25 Feb 2011 14:05:42 +0000 (14:05 +0000)
Lib/test/list_tests.py

index 89ea40f78007ed33368aff17af7261cf5fd298d4..0c656fd098b311e37906fbe079195935b9382c28 100644 (file)
@@ -461,9 +461,8 @@ class CommonTest(seq_tests.CommonTest):
         # test that it's a shallow, not a deep copy
         u = self.type2test([1, 2, [3, 4], 5])
         v = u.copy()
-        v[2].append(666)
-        self.assertEqual(u, [1, 2, [3, 4, 666], 5])
         self.assertEqual(u, v)
+        self.assertIs(v[3], u[3])
 
         self.assertRaises(TypeError, u.copy, None)