Comment on 3 percent of Python codebases we checked had silently failing unit testsparentComments−justinsaccount4yThe 2nd argument is the 'msg' argument.With modern features in python you could change the signature to assertTrue(expr, *, msg=None) which would prevent that issue.−d0mine4yor just: assert expr, "custom message" though given the verbose api, it is ok to require the explicit msg kwarg (duplication in the tests is ok if it makes them more robust)
Comments
The 2nd argument is the 'msg' argument.
With modern features in python you could change the signature to
which would prevent that issue.or just:
though given the verbose api, it is ok to require the explicit msg kwarg (duplication in the tests is ok if it makes them more robust)