[Numpy-svn] r5947 - trunk/numpy/ma/tests

numpy-svn@scip... numpy-svn@scip...
Sun Oct 19 14:33:12 CDT 2008


Author: pierregm
Date: 2008-10-19 14:33:10 -0500 (Sun, 19 Oct 2008)
New Revision: 5947

Modified:
   trunk/numpy/ma/tests/test_mrecords.py
Log:
* make sure we call self.failUnless instead of assert

Modified: trunk/numpy/ma/tests/test_mrecords.py
===================================================================
--- trunk/numpy/ma/tests/test_mrecords.py	2008-10-18 02:14:51 UTC (rev 5946)
+++ trunk/numpy/ma/tests/test_mrecords.py	2008-10-19 19:33:10 UTC (rev 5947)
@@ -362,19 +362,19 @@
         (mrec, a, b, arr) = self.data
         ntype = (np.float, 2)
         test = mrec.view(ntype)
-        assert(isinstance(test, ma.MaskedArray))
+        self.failUnless(isinstance(test, ma.MaskedArray))
         assert_equal(test, np.array(zip(a,b), dtype=np.float))
-        assert(test[3,1] is ma.masked)
+        self.failUnless(test[3,1] is ma.masked)
     #
     def test_view_flexible_type(self):
         (mrec, a, b, arr) = self.data
         alttype = [('A',np.float), ('B',np.float)]
         test = mrec.view(alttype)
-        assert(isinstance(test, MaskedRecords))
+        self.failUnless(isinstance(test, MaskedRecords))
         assert_equal_records(test, arr.view(alttype))
-        assert(test['B'][3] is masked)
+        self.failUnless(test['B'][3] is masked)
         assert_equal(test.dtype, np.dtype(alttype))
-        assert(test._fill_value is None)
+        self.failUnless(test._fill_value is None)
 
 
 ################################################################################



More information about the Numpy-svn mailing list