Re:3 percent of Python codebases we checked had silently fai...
by cyberia23424 on Wednesday February 16, 2022 @09:55AM
(#30360733)
Second arg is a string message to display when test fails
[ Parent
| on HN ]
Re:3 percent of Python codebases we checked had silently fai...
by 6LLvveMx2koXfwn on Wednesday February 16, 2022 @10:00AM
(#30360821)
Indeed, from TFA;
"assertTrue also accepts a second argument, which is the custom error message to show if the first argument is not truthy. This call signature allows the mistake to be made and the test to pass and therefore possibly fail silently."