Re: unittest wart/bug for assertNotEqual

2009-10-22 Thread Ethan Furman
Gabriel Genellina wrote: En Tue, 20 Oct 2009 19:57:19 -0300, Ethan Furman escribió: Steven D'Aprano wrote: On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote: My preference would be that failIfEqual checks both != and ==. This is practical, and would benefit almost all use cases. If "!="

Re: unittest wart/bug for assertNotEqual

2009-10-22 Thread Gabriel Genellina
En Tue, 20 Oct 2009 19:57:19 -0300, Ethan Furman escribió: Steven D'Aprano wrote: On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote: My preference would be that failIfEqual checks both != and ==. This is practical, and would benefit almost all use cases. If "!=" isn't "not ==" (IEEE NaNs

Re: unittest wart/bug for assertNotEqual

2009-10-20 Thread Ethan Furman
Steven D'Aprano wrote: On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote: My preference would be that failIfEqual checks both != and ==. This is practical, and would benefit almost all use cases. If "!=" isn't "not ==" (IEEE NaNs I hear is the only known use case) numpy uses == and != as

Re: unittest wart/bug for assertNotEqual

2009-10-20 Thread Steven D'Aprano
On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote: > My preference would be that failIfEqual checks both != and ==. This is > practical, and would benefit almost all use cases. If "!=" isn't "not > ==" (IEEE NaNs I hear is the only known use case) numpy uses == and != as element-wise operators:

Re: unittest wart/bug for assertNotEqual

2009-10-20 Thread Zac Burns
> I was with you right up to the last six words. > > Whether it's worth changing assertNotEqual to be something other than an > alias of failIfEqual is an interesting question. Currently all the > assert* and fail* variants are aliases of each other, which is easy to > learn. This would introduce a

Re: unittest wart/bug for assertNotEqual

2009-10-20 Thread Steven D'Aprano
On Tue, 20 Oct 2009 10:20:54 -0700, Zac Burns wrote: > Using the assertNotEqual method of UnitTest (synonym for failIfEqual) > only checks if first == second, but does not include not (first != > second) > > According to the docs: > http://docs.python.org/reference/datamodel.html#specialnames The

Re: unittest wart/bug for assertNotEqual

2009-10-20 Thread Mark Dickinson
On Oct 20, 6:20 pm, Zac Burns wrote: > Using the assertNotEqual method of UnitTest (synonym for failIfEqual) > only checks if first == second, but does not include not (first != > second) It looks as though this is fixed in Python 2.7 (and also in 3.1): http://svn.python.org/view?view=rev&revisi

unittest wart/bug for assertNotEqual

2009-10-20 Thread Zac Burns
Using the assertNotEqual method of UnitTest (synonym for failIfEqual) only checks if first == second, but does not include not (first != second) According to the docs: http://docs.python.org/reference/datamodel.html#specialnames There are no implied relationships among the comparison operators. Th