mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
rewrite with assertIs
This commit is contained in:
parent
83a0efd303
commit
2ec8cbc75f
1 changed files with 1 additions and 2 deletions
|
|
@ -461,9 +461,8 @@ class CommonTest(seq_tests.CommonTest):
|
||||||
# test that it's a shallow, not a deep copy
|
# test that it's a shallow, not a deep copy
|
||||||
u = self.type2test([1, 2, [3, 4], 5])
|
u = self.type2test([1, 2, [3, 4], 5])
|
||||||
v = u.copy()
|
v = u.copy()
|
||||||
v[2].append(666)
|
|
||||||
self.assertEqual(u, [1, 2, [3, 4, 666], 5])
|
|
||||||
self.assertEqual(u, v)
|
self.assertEqual(u, v)
|
||||||
|
self.assertIs(v[3], u[3])
|
||||||
|
|
||||||
self.assertRaises(TypeError, u.copy, None)
|
self.assertRaises(TypeError, u.copy, None)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue