[Scipy-svn] r2179 - trunk/Lib/io/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Aug 25 03:48:17 CDT 2006


Author: stefan
Date: 2006-08-25 03:48:12 -0500 (Fri, 25 Aug 2006)
New Revision: 2179

Modified:
   trunk/Lib/io/tests/test_mio.py
Log:
In test_mio, check accuracy to 5 decimals only (allows results to be
typed in code).  Add vec as a testcase.


Modified: trunk/Lib/io/tests/test_mio.py
===================================================================
--- trunk/Lib/io/tests/test_mio.py	2006-08-25 08:08:57 UTC (rev 2178)
+++ trunk/Lib/io/tests/test_mio.py	2006-08-25 08:48:12 UTC (rev 2179)
@@ -52,10 +52,11 @@
             assert SP.issparse(actual), "Expected sparse at %s" % label
             assert_array_almost_equal(actual.todense(),
                                       expected.todense(),
-                                      err_msg = label)
+                                      err_msg = label,
+                                      decimal = 5)
         elif isinstance(expected, ndarray):
             assert isinstance(actual, ndarray), "Expected ndarray at %s" % label
-            assert_array_almost_equal(actual, expected, err_msg=label)
+            assert_array_almost_equal(actual, expected, err_msg=label, decimal = 5)
         else:
             assert isinstance(expected, type(actual)), \
                    "Types %s and %s do not match at %s" % (type(expected), type(actual), label)
@@ -183,6 +184,12 @@
         {'name': 'object',
          'expected': {'testobject': a}
          })
+         
+    case_table.append(
+        {'name': 'vec',
+         'expected': {'fit_params': array([1.27661364061704e+09,7.51130255826677e-03]),
+                      'xdot_filt': array([8.11154474752301e-13,1.28504039006994e-11])}
+         })
     
     # add tests
     for case in case_table:



More information about the Scipy-svn mailing list