summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2003-08-07 14:58:10 (GMT)
committerMichael W. Hudson <mwh@python.net>2003-08-07 14:58:10 (GMT)
commite723e453a1f11f4865f25d93d3cf20280d9f831a (patch)
treeca1ffcac4e71addc3e0cab18a108d1964da51180 /Lib/test/test_descr.py
parentbb18f620ad11c0536c36df54ee86fc21fd05f9ec (diff)
downloadcpython-e723e453a1f11f4865f25d93d3cf20280d9f831a.zip
cpython-e723e453a1f11f4865f25d93d3cf20280d9f831a.tar.gz
cpython-e723e453a1f11f4865f25d93d3cf20280d9f831a.tar.bz2
Repair refcounting on error return from type_set_bases.
Include a test case that failed for one of my efforts to repair this.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index cb13ff2..b3336d1 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3586,6 +3586,13 @@ def test_mutable_bases():
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:
pass