mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add regression test for SF bug #476616 -- make sure copy of a derived class
does not share data with the original.
This commit is contained in:
parent
3ce5af70e3
commit
526286725d
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ m2 = MyUserDict(u2)
|
|||
m2a = m2.copy()
|
||||
verify(m2a == m2)
|
||||
|
||||
# SF bug #476616 -- copy() of UserDict subclass shared data
|
||||
m2['foo'] = 'bar'
|
||||
verify(m2a != m2)
|
||||
|
||||
# Test keys, items, values
|
||||
|
||||
verify(u2.keys() == d2.keys())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue