Tighten the tests for assignment to __bases__: disallow empty tuple.
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index ed4593e..5a1fcec 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3486,6 +3486,14 @@
raise TestFailed, "shouldn't be able to delete .__bases__"
try:
+ D.__bases__ = ()
+ except TypeError, msg:
+ if str(msg) == "a new-style class can't have only classic bases":
+ raise TestFailed, "wrong error message for .__bases__ = ()"
+ else:
+ raise TestFailed, "shouldn't be able to set .__bases__ to ()"
+
+ try:
D.__bases__ = (D,)
except TypeError:
pass