5 Jan 2005 11:29
Re: scipy testing changes revisited
Pearu Peterson <pearu <at> cens.ioc.ee>
2005-01-05 10:29:34 GMT
2005-01-05 10:29:34 GMT
On 22 Dec 2004, Todd Miller wrote: > A week or so ago we were discussing the set of changes to scipy's > testing framework needed to add support for numarray. The changes I'm > talking about here should be made to the main trunk of scipy CVS. > > After further review, I now think the array versions of the assert > family of functions (e.g. assert_array_equal) are correct with respect > to truth value testing. So, the only change I think is needed is the > addition of "delegation code" so that calls to assert_equal, etc. defer > to assert_array_equal, etc. when passed array parameters. Here's the > patch: I have applied the patch with an addition of calling array versions of assert_* functions whenever either of arguments is an array. > These changes are necessary for adding numarray support to scipy because > without them there are 12 testing failures (in scipy_base.test()). The > failures are all related to numarray's "outlawed" __nonzero__() and > testers apparently calling the wrong assertion function. With these > changes, 7 of the numarray failures go away and 5 identical failures > remain for both numarray and Numeric. I'm arguing that the 5 remaining > failures are either real problems or testing bugs which were masked by > testers calling the wrong assert functions and by Numeric's sometrue() > definition of __nonzero__(). I agree. These 5 failures are now fixed in the main trunk. > In each case you can see that assert_array_equal has been called from(Continue reading)
RSS Feed