[Scipy-svn] r3446 - trunk/scipy/io/tests

scipy-svn@scip... scipy-svn@scip...
Thu Oct 18 17:25:44 CDT 2007


Author: matthew.brett@gmail.com
Date: 2007-10-18 17:25:30 -0500 (Thu, 18 Oct 2007)
New Revision: 3446

Modified:
   trunk/scipy/io/tests/test_mio.py
Log:
Fixed tests to use only 3d matrix matlab 5 round trip

Modified: trunk/scipy/io/tests/test_mio.py
===================================================================
--- trunk/scipy/io/tests/test_mio.py	2007-10-18 08:06:05 UTC (rev 3445)
+++ trunk/scipy/io/tests/test_mio.py	2007-10-18 22:25:30 UTC (rev 3446)
@@ -89,7 +89,7 @@
     def _make_rt_check_case(name, expected, format):
         def cc(self):
             mat_stream = StringIO()
-            savemat(mat_stream, expected, format)
+            savemat(mat_stream, expected, format=format)
             mat_stream.seek(0)
             self._check_case(name, [mat_stream], expected)
         cc.__doc__ = "check loadmat case %s" % name
@@ -162,6 +162,10 @@
         {'name': '3dmatrix',
          'expected': {'test3dmatrix': transpose(reshape(range(1,25), (4,3,2)))}
          })
+    case_table5_rt = [
+        {'name': '3dmatrix',
+         'expected': {'test3dmatrix': transpose(reshape(range(1,25), (4,3,2)))}
+         }]
     st = mat_struct()
     st.stringfield = u'Rats live on no evil star.'
     st.doublefield = array([sqrt(2),exp(1),pi])
@@ -225,7 +229,7 @@
         assert files, "No files for test %s using filter %s" % (name, filt)
         exec 'check_%s = _make_check_case(name, files, expected)' % name
     # round trip tests
-    for case in case_table4 + case_table5:
+    for case in case_table4 + case_table5_rt:
         name = case['name'] + '_round_trip'
         expected = case['expected']
         format = case in case_table4 and '4' or '5'



More information about the Scipy-svn mailing list