Let’s look at the errors one at a time. Here’s the first one:
____________________________________________________________________ test_template[test_two_problems_arrangement1] _____________________________________________________________________
arguments = [['3801 - 2', '123 + 49']], expected_output = ' 3801 123\n- 2 + 49\n------ -----'
fail_message = 'Expected different output when calling "arithmetic_arranger()" with ["3801 - 2", "123 + 49"]'
> ???
E AssertionError: Expected different output when calling "arithmetic_arranger()" with ["3801 - 2", "123 + 49"]
E assert 'Error: Too many problems.' == ' 3801 123\n- 2 + 49\n------ -----'
E + Error: Too many problems.
E - 3801 123
E - - 2 + 49
E - ------ -----
/home/runner/boilerplate-arithmetic-formatter-2/test_module.py:77: AssertionError
This line:
E assert 'Error: Too many problems.' == ' 3801 123\n- 2 + 49\n------ -----'
Says your output was Error: Too many problems.
but it expected this string: 3801 123\n- 2 + 49\n------ -----
This was pretty confusing because when I copied the test arguments it looks like it works:
print(arithmetic_arranger([['3801 - 2', '123 + 49']]))
3801 123
- 2 + 49
------ -----
but when you run the test it prints out ‘Error: Too many problems.’
However, if you look at the new loaded boilerplate and the original function call it looks like this
https://www.freecodecamp.org/learn/scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter
arithmetic_arranger(["32 + 698", "3801 - 2", "45 + 43", "123 + 49"])
Your code is working for a function call that looks like this:
arithmetic_arranger([['3801 - 2', '123 + 49']])
You’ve added a nested list there, but the tests don’t do that.
Put this in your main.py
print(arithmetic_arranger(['3801 - 2', '123 + 49']))
And you will see the problem.