Commit 82c8d297 authored by Stefan Behnel's avatar Stefan Behnel

Improve error message if assertion fails.

parent f9ab976c
......@@ -13020,9 +13020,10 @@ class PyTypeTestNode(CoercionNode):
exact_builtin_type = True
def __init__(self, arg, dst_type, env, notnone=False):
# The arg is know to be a Python object, and
# The arg is known to be a Python object, and
# the dst_type is known to be an extension type.
assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type"
assert dst_type.is_extension_type or dst_type.is_builtin_type, \
"PyTypeTest on non extension type %s" % dst_type
CoercionNode.__init__(self, arg)
self.type = dst_type
self.result_ctype = arg.ctype()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment