ft1.1: Traceback (most recent call last): File "D:\小米云盘\桌面\temp1\text.py", line 12, in test_function self.assertEqual(function(2, 0, 4), 7.0) AssertionError: 5.0 != 7.0 Traceback (most recent call last): File "D:\小米云盘\桌面\temp1\text.py", line 12, i
时间: 2023-09-10 14:15:38 浏览: 165
t seems like you have encountered an error while running a test function in a Python script. The error message suggests that an assertion has failed, meaning that the expected output of a function is not equal to the actual output. Specifically, the test function is expecting the result of a function call with arguments (2, 0, 4) to be 7.0, but the actual result is 5.0.
To fix this error, you will need to modify the function being tested to return the correct output. Without seeing the code for the function and the test function, it is difficult to provide more specific advice. However, some common reasons for assertion errors include incorrect logic in the function, incorrect input values, and incorrect expected output values in the test function.
阅读全文