mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08: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
@ -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…
Reference in New Issue
Block a user