[EMAIL PROTECTED] wrote: > hello, > > I found that if I use Numeric.array into unittest it is not > consistance, > Is that normal ? > > import Numeric > class myTest(unittest.TestCase): > def runTest(self): > a = Numeric.array([1,2]) > b = Numeric.array([1,33]) > self.assertEqual(a, b) > pass > > > This will not raise any error ??? > > Any idea?
unittest.TestCase.assertEqual() uses == to compare a and b. Numeric arrays have rich comparisons and so return arrays, not booleans. Try it in the interpreter. To get a boolean from a==b, use Numeric.alltrue(a==b). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list