assertion_funcfirst second msg=msgE TypeError assertListEqual got an unexpected keyword argument msg
The assertListEqual() method does not have a parameter named 'msg'. Therefore, it is not possible to pass the 'msg' parameter to this method. To add a custom message to the assertion, you can use the assert statement and format the message using the f-string syntax. Here's an example:
assert first == second, f"Lists do not match. Expected {second}, but got {first}."
This will raise an AssertionError with the custom message if the two lists do not match.
原文地址: http://www.cveoy.top/t/topic/fjdJ 著作权归作者所有。请勿转载和采集!