refactor(tracing): add generic tracing functions for generic functions

- remove nearly duplicated code when tracing GenericFunction for unary and
binary operators

refs #965
This commit is contained in:
Arthur Meyre
2021-11-22 18:14:23 +01:00
parent ba6207e71e
commit f1ed07d580
2 changed files with 32 additions and 62 deletions

View File

@@ -687,7 +687,10 @@ def subtest_fuse_float_binary_operations_dont_support_two_variables(fun, tensor_
params_names = signature(function_to_trace).parameters.keys()
with pytest.raises(NotImplementedError, match=r"Can't manage binary operator"):
with pytest.raises(
AssertionError,
match=r"Can only have 1 non constant predecessor in _np_operator, got 2 for operator",
):
trace_numpy_function(
function_to_trace,
{