def class_type_is_not_func_type(self): class_type = types.class_type("A") assert not types.is_func_type(class_type)
def class_type_with_call_magic_method_is_not_func_type(self): class_type = types.class_type("A", [ types.attr("__call__", types.func([], types.none_type)), ]) assert not types.is_func_type(class_type)
def func_type_is_func_type(self): func_type = types.func([], types.none_type) assert types.is_func_type(func_type)