Tell us what’s happening:
I have problem with those tests:
test_module.py::test_template[test_two_problems_with_solutions] FAILED [ 90%]
test_module.py::test_template[test_five_problems_with_solutions] FAILED [100%]
==========================Beginning=============================
_______________ test_template[test_two_problems_with_solutions] _______________
arguments = [[‘3 + 855’, ‘988 + 40’], True]
expected_output = ’ 3 988\n+ 855 + 40\n----- -----\n 858 1028’
fail_message = ‘Expected solutions to be correctly displayed in output when calling “arithmetic_arranger()” with [“3 + 855”, “988 + 40”] and a second argument of True
.’
@pytest.mark.parametrize('arguments,expected_output,fail_message', test_cases)
def test_template(arguments, expected_output, fail_message):
actual = arithmetic_arranger(*arguments)
E TypeError: arithmetic_arranger() takes 1 positional argument but 2 were given
test_module.py:76: TypeError
==============================End==============================
(the second error is same like the first one)
I don’t know how to fix it when I know that once I will get one argument and in the last two I will one more bool argument. (if it was tuple, I could use “try”, but its not )
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
Challenge: Scientific Computing with Python Projects - Arithmetic Formatter
Link to the challenge: