4 ms·
The 2nd argument is the 'msg' argument. With modern features in python you could change the signature to assertTrue(expr, *, msg=None) which would prevent
by justinsaccount 5y ago
The 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.
- d0mine 5y agoor 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)