[Scipy-svn] r6497 - trunk/scipy/io/matlab/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jun 9 13:46:39 EDT 2010
Author: stefan
Date: 2010-06-09 12:46:39 -0500 (Wed, 09 Jun 2010)
New Revision: 6497
Modified:
trunk/scipy/io/matlab/tests/test_byteordercodes.py
trunk/scipy/io/matlab/tests/test_mio.py
trunk/scipy/io/matlab/tests/test_mio5_utils.py
trunk/scipy/io/matlab/tests/test_mio_funcs.py
trunk/scipy/io/matlab/tests/test_mio_utils.py
trunk/scipy/io/matlab/tests/test_streams.py
Log:
ENH: Allow scipy.io.matlab tests to be run individually.
Modified: trunk/scipy/io/matlab/tests/test_byteordercodes.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_byteordercodes.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_byteordercodes.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -4,7 +4,7 @@
import numpy as np
-from numpy.testing import assert_raises
+from numpy.testing import assert_raises, run_module_suite
import scipy.io.matlab.byteordercodes as sibc
@@ -26,3 +26,6 @@
for code in ('big', '>', 'b', 'B', 'be'):
assert sibc.to_numpy_code(code) == '>'
assert_raises(ValueError, sibc.to_numpy_code, 'silly string')
+
+if __name__ == "__main__":
+ run_module_suite()
Modified: trunk/scipy/io/matlab/tests/test_mio.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_mio.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -17,7 +17,7 @@
assert_array_equal, \
assert_array_almost_equal, \
assert_equal, \
- assert_raises
+ assert_raises, run_module_suite
from nose.tools import assert_true
@@ -774,3 +774,5 @@
res = loadmat(stream)
yield assert_array_equal, res['a'], out_arr_u
+if __name__ == "__main__":
+ run_module_suite()
Modified: trunk/scipy/io/matlab/tests/test_mio5_utils.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio5_utils.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_mio5_utils.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -9,7 +9,8 @@
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
-from numpy.testing import assert_array_equal, assert_array_almost_equal
+from numpy.testing import assert_array_equal, assert_array_almost_equal, \
+ run_module_suite
import scipy.io.matlab.byteordercodes as boc
import scipy.io.matlab.streams as streams
@@ -158,3 +159,5 @@
el = c_reader.read_numeric()
yield assert_true, el.flags.writeable
+if __name__ == "__main__":
+ run_module_suite()
Modified: trunk/scipy/io/matlab/tests/test_mio_funcs.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio_funcs.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_mio_funcs.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -10,7 +10,7 @@
assert_array_equal, \
assert_array_almost_equal, \
assert_equal, \
- assert_raises
+ assert_raises, run_module_suite
from nose.tools import assert_true
@@ -57,3 +57,6 @@
# example
fname = pjoin(test_data_path, 'parabola.mat')
ws_vars = read_workspace_vars(fname)
+
+if __name__ == "__main__":
+ run_module_suite()
Modified: trunk/scipy/io/matlab/tests/test_mio_utils.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_mio_utils.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_mio_utils.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -7,7 +7,8 @@
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
-from numpy.testing import assert_array_equal, assert_array_almost_equal
+from numpy.testing import assert_array_equal, assert_array_almost_equal, \
+ run_module_suite
from scipy.io.matlab.mio_utils import cproduct, squeeze_element, \
chars_to_strings
@@ -53,4 +54,7 @@
arr = np.array([['']], dtype='U1')
out_arr = np.array([''], dtype='U1')
yield assert_array_equal, chars_to_strings(arr), out_arr
-
+
+if __name__ == "__main__":
+ run_module_suite()
+
Modified: trunk/scipy/io/matlab/tests/test_streams.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_streams.py 2010-06-09 17:46:02 UTC (rev 6496)
+++ trunk/scipy/io/matlab/tests/test_streams.py 2010-06-09 17:46:39 UTC (rev 6497)
@@ -13,7 +13,8 @@
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
-from numpy.testing import assert_array_equal, assert_array_almost_equal
+from numpy.testing import assert_array_equal, assert_array_almost_equal, \
+ run_module_suite
from scipy.io.matlab.streams import make_stream, \
GenericStream, cStringStream, FileStream, \
@@ -88,3 +89,6 @@
res = _read_string(st, 4)
yield assert_equal, res, 'ring'
yield assert_raises, IOError, _read_string, st, 2
+
+if __name__ == "__main__":
+ run_module_suite()
More information about the Scipy-svn
mailing list