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

Facundo Batista facundobatista at gmail.com
Wed Mar 19 17:21:14 CET 2008


2008/3/19, Barry Warsaw <barry at python.org>:

>  > +1 to assert* from me. the fail* variants always feel like
>  > double-negatives. I also always use assertTrue instead of assert_. But
>  > I don't care enough to argue about it. :)

+1 to the plain affirmative propositions (assert*) instead of the
kind-of-double-negative stuff. It helps a lot specially if you're not
a native english speaker.

+1 to remove them in Py3k.

Questions:

- 2to3 should "fix" them?

- should we add a warning in 2.6 and remove them in 2.7? Or 2.7/2.8?

Regards,

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the Python-Dev mailing list