def test_function_arguments_generic(args: typing.List[Type], return_type: Type): func = Function(([T, List(T)], Set(T)), ([Set(List(T))], Integer), ([Set(T), List(T)], T)) assert func.takes_arguments(args) == return_type
def test_function_arguments(args: typing.List[Type], return_type: Type): func = Function(([Integer, Integer], Integer), ([Integer, Real], Bool), ([Real, Real], Color), ([Real, List(Integer)], Real), ([Color, Real, ...], Side)) res = func.takes_arguments(args) assert res == return_type