mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
a test for an error condition not covered by existing tests
(noticed this when writing the equivalent code for pypy)
This commit is contained in:
parent
3f969022c6
commit
f390442130
1 changed files with 7 additions and 0 deletions
|
@ -3622,6 +3622,13 @@ def test_mutable_bases():
|
|||
else:
|
||||
raise TestFailed, "shouldn't be able to assign to list.__bases__"
|
||||
|
||||
try:
|
||||
D.__bases__ = (C2, list)
|
||||
except TypeError:
|
||||
pass
|
||||
else:
|
||||
assert 0, "best_base calculation found wanting"
|
||||
|
||||
try:
|
||||
del D.__bases__
|
||||
except TypeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue