def test_apply_function_to_single_or_list_apply_to_single(): def multiply(parameter): parameter_processed = 2 * parameter return parameter_processed parameter = 1 parameter_processed = C0.apply_function_to_single_or_list( multiply, parameter) assert parameter_processed == 2, f"The multiplication with a single value fails."
def test_apply_function_to_single_or_list_apply_to_list(): def multiply(parameter): parameter_processed = 2 * parameter return parameter_processed parameter = [1, 1] parameter_processed = C0.apply_function_to_single_or_list( multiply, parameter) assert parameter_processed == [2, 2], f"The multiplication with a list fails."