]> granicus.if.org Git - python/commitdiff
a test for an error condition not covered by existing tests
authorMichael W. Hudson <mwh@python.net>
Thu, 23 Nov 2006 13:54:04 +0000 (13:54 +0000)
committerMichael W. Hudson <mwh@python.net>
Thu, 23 Nov 2006 13:54:04 +0000 (13:54 +0000)
(noticed this when writing the equivalent code for pypy)

Lib/test/test_descr.py

index b108395269267da366e27503bd1547edb3951353..89279070cd70c008a1e476a3f1141bf211bec5be 100644 (file)
@@ -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: