[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

Steven D'Aprano report at bugs.python.org
Tue Nov 5 19:23:26 EST 2019


Steven D'Aprano <steve+python at pearwood.info> added the comment:

I'm reopening this as an enhancement, because I think Mikeli is onto something here. I'd like to propose making the messages:

    "False is not a truthy value."
    "True is not a falsey value."

to make it explicit that we are testing not for the singletons True and False by identity, but for any truthy or falsey value.

If you don't like the terms "truthy" and "falsey", lower-case true and false would also be acceptable.

----------
nosy: +steven.daprano
resolution: not a bug -> 
status: closed -> open
type:  -> enhancement
versions:  -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38706>
_______________________________________


More information about the Python-bugs-list mailing list