Write your code in arithmetic_arranger.py
. For development, you can use main.py
to test your arithmetic_arranger()
function. Click the “run” button and main.py
will run.
Hi there. Did you have a question about this?
Hi,
I am having trouble seeing what is wrong with this output, must be something obvious?
thanks
__________ 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”]’
@pytest.mark.parametrize('arguments,expected_output,fail_message', test_cases)
def test_template(arguments, expected_output, fail_message):
actual = arithmetic_arranger(*arguments)
assert actual == expected_output, fail_message
E AssertionError: Expected different output when calling “arithmetic_arranger()” with [“3801 - 2”, “123 + 49”]
E assert ’ 3801 123\n- 2 + 49\n------ -----\n 3799 172’ == ’ 3801 123\n- 2 + 49\n------ -----’
E 3801 123
E - 2 + 49
E - ------ -----
E + ------ -----
E ? +
E + 3799 172
test_module.py:77: AssertionError
please stop posting your code to this topic. Use the topic you own already here
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.