assert str(msg) == "base class 'object' is not a heap type"
try:
import wrongbase
assert False
except TypeError as msg:
assert str(msg) == "best base 'str' must be equal to first base 'wrongbase.Base'"
try:
import badmro
assert False
except TypeError as msg:
assert str(msg).startswith("Cannot create a consistent method resolution")
try:
import nodict
assert False
except TypeError as msg:
assert str(msg) == "extension type 'nodict.X' has no __dict__ slot, but base type 'Py' has: either add 'cdef dict __dict__' to the extension type or add '__slots__ = [...]' to the base type"