summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2006-11-23 13:54:04 (GMT)
committerMichael W. Hudson <mwh@python.net>2006-11-23 13:54:04 (GMT)
commitf39044213058a354db11b9b44ff0addf81a4bbd4 (patch)
treef1aadd49aa54734ab24067240eb4c45247697662 /Lib/test/test_descr.py
parent3f969022c675c2f30258846f1ae44d8de9aa7312 (diff)
downloadcpython-f39044213058a354db11b9b44ff0addf81a4bbd4.zip
cpython-f39044213058a354db11b9b44ff0addf81a4bbd4.tar.gz
cpython-f39044213058a354db11b9b44ff0addf81a4bbd4.tar.bz2
a test for an error condition not covered by existing tests
(noticed this when writing the equivalent code for pypy)
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 b108395..8927907 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3623,6 +3623,13 @@ def test_mutable_bases():
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:
pass