Repair refcounting on error return from type_set_bases.

Include a test case that failed for one of my efforts to repair this.
This commit is contained in:
Michael W. Hudson 2003-08-07 14:58:10 +00:00
parent bb18f620ad
commit e723e453a1
2 changed files with 13 additions and 3 deletions

View file

@ -3585,6 +3585,13 @@ def test_mutable_bases():
# actually, we'll have crashed by here...
raise TestFailed, "shouldn't be able to create inheritance cycles"
try:
D.__bases__ = (C, C)
except TypeError:
pass
else:
raise TestFailed, "didn't detect repeated base classes"
try:
D.__bases__ = (E,)
except TypeError: