diff --git a/ivy_tests/test_ivy/helpers/testing_helpers.py b/ivy_tests/test_ivy/helpers/testing_helpers.py index 6c76e6e9f645a..b4c490bcd684c 100644 --- a/ivy_tests/test_ivy/helpers/testing_helpers.py +++ b/ivy_tests/test_ivy/helpers/testing_helpers.py @@ -664,7 +664,9 @@ def handle_method( ) if init_num_positional_args is None: - init_num_positional_args = num_positional_args(fn_name=init_tree) + init_num_positional_args = num_positional_args( + fn_name=method_tree.rpartition(".")[0] + ) possible_arguments["init_flags"] = pf.init_method_flags( num_positional_args=init_num_positional_args, @@ -673,10 +675,7 @@ def handle_method( precision_mode=_get_runtime_flag_value(precision_mode), ) - if method_num_positional_args is None: - method_num_positional_args = num_positional_args_method( - method=callable_method - ) + method_num_positional_args = num_positional_args_method(method=callable_method) possible_arguments["method_flags"] = pf.method_flags( num_positional_args=method_num_positional_args, diff --git a/ivy_tests/test_ivy/test_stateful/test_activations.py b/ivy_tests/test_ivy/test_stateful/test_activations.py index 6a1892b165c6f..e6103ac963198 100644 --- a/ivy_tests/test_ivy/test_stateful/test_activations.py +++ b/ivy_tests/test_ivy/test_stateful/test_activations.py @@ -20,7 +20,9 @@ small_abs_safety_factor=8, safety_factor_scale="log", ), - method_num_positional_args=helpers.num_positional_args(fn_name="ELU._forward"), + method_num_positional_args=helpers.num_positional_args_method( + method="ELU._forward" + ), test_gradients=st.just(True), alpha=helpers.floats(min_value=0.1, max_value=1), ) @@ -45,8 +47,8 @@ def test_elu( method_flags=method_flags, init_input_dtypes=input_dtype, method_input_dtypes=input_dtype, - init_all_as_kwargs_np={}, - method_all_as_kwargs_np={"x": x[0], "alpha": alpha}, + init_all_as_kwargs_np={"alpha": alpha}, + method_all_as_kwargs_np={"x": x[0]}, class_name=class_name, method_name=method_name, rtol_=1e-2,