[Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

Michael Foord fuzzyman at voidspace.org.uk
Wed Mar 19 23:21:55 CET 2008


Jonathan Lange wrote:
> On Wed, Mar 19, 2008 at 6:24 PM, Gabriel Grant <grantgm at mcmaster.ca> wrote:
>   
>> Hi all,
>>
>>  This gem from unittest.py is pretty much the opposite of "one obvious way":
>>
>>     # Synonyms for assertion methods
>>
>>     
> [snip]
>   
>>  Could these be removed for 3k?
>>
>>     
>
> I agree with others who say that we shouldn't do this for Python 3k.
> If we want to get rid of them, we should deprecate them, wait a
> release or so, *then* remove them.
>
> That said, can we axe one of (assertEqual, assertEquals) too?
>   

We should keep 'assertEquals'.

Michael
> jml
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
>   



More information about the Python-Dev mailing list