[Scipy-svn] r5335 - trunk/scipy/weave/tests

scipy-svn@scip... scipy-svn@scip...
Tue Jan 6 14:19:33 CST 2009


Author: jarrod.millman
Date: 2009-01-06 14:19:31 -0600 (Tue, 06 Jan 2009)
New Revision: 5335

Modified:
   trunk/scipy/weave/tests/test_ast_tools.py
   trunk/scipy/weave/tests/test_blitz_tools.py
   trunk/scipy/weave/tests/test_ext_tools.py
   trunk/scipy/weave/tests/test_slice_handler.py
Log:
BUG:  unlike print_assert_equal, assert_equal's first argument is one of the tested item


Modified: trunk/scipy/weave/tests/test_ast_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_ast_tools.py	2009-01-06 19:54:15 UTC (rev 5334)
+++ trunk/scipy/weave/tests/test_ast_tools.py	2009-01-06 20:19:31 UTC (rev 5335)
@@ -11,7 +11,7 @@
         import parser
         ast_list = parser.suite(expr).tolist()
         actual = ast_tools.harvest_variables(ast_list)
-        assert_equal(expr,actual,desired)
+        assert_equal(actual,desired,expr)
 
     def test_simple_expr(self):
         """convert simple expr to blitz

Modified: trunk/scipy/weave/tests/test_blitz_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_blitz_tools.py	2009-01-06 19:54:15 UTC (rev 5334)
+++ trunk/scipy/weave/tests/test_blitz_tools.py	2009-01-06 20:19:31 UTC (rev 5335)
@@ -20,7 +20,7 @@
         actual = blitz_tools.ast_to_blitz_expr(ast_list)
         actual = remove_whitespace(actual)
         desired = remove_whitespace(desired)
-        assert_equal(expr,actual,desired)
+        assert_equal(actual,desired,expr)
 
     def test_simple_expr(self):
         """convert simple expr to blitz

Modified: trunk/scipy/weave/tests/test_ext_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_ext_tools.py	2009-01-06 19:54:15 UTC (rev 5334)
+++ trunk/scipy/weave/tests/test_ext_tools.py	2009-01-06 20:19:31 UTC (rev 5335)
@@ -132,8 +132,7 @@
         cd = c_spec.int_converter()
         cd.name, cd.var_type = 'c', types.IntType
         desired = [ad,bd,cd]
-        expr = ""
-        assert_equal(expr,actual,desired)
+        assert_equal(actual,desired)
 
 if __name__ == "__main__":
     nose.run(argv=['', __file__])

Modified: trunk/scipy/weave/tests/test_slice_handler.py
===================================================================
--- trunk/scipy/weave/tests/test_slice_handler.py	2009-01-06 19:54:15 UTC (rev 5334)
+++ trunk/scipy/weave/tests/test_slice_handler.py	2009-01-06 20:19:31 UTC (rev 5335)
@@ -9,7 +9,7 @@
         pos = slice_vars['pos']
         ast_list = slice_handler.build_slice_atom(slice_vars,pos)
         actual = ast_to_string(ast_list)
-        assert_equal('',actual,desired)
+        assert_equal(actual,desired)
     def test_exclusive_end(self):
         slice_vars = {'begin':'1', 'end':'2', 'step':'_stp',
                       'single_index':'_index','pos':0}
@@ -24,7 +24,7 @@
         found, data = find_first_pattern(ast_tuple,indexed_array_pattern)
         subscript = data['subscript_list'][1] #[0] is symbol, [1] is the supscript
         actual = slice_handler.slice_ast_to_dict(subscript)
-        assert_equal(suite_string,actual,desired)
+        assert_equal(actual,desired,suite_string)
 
     def test_empty_2_slice(self):
         """match slice from a[:]"""
@@ -126,7 +126,7 @@
         # but differently formatted string will compare equally
         actual = replace_whitespace(actual)
         desired = replace_whitespace(desired)
-        assert_equal(suite_string,actual,desired)
+        assert_equal(actual,desired,suite_string)
 
     def test_simple_expr(self):
         """transform a[:] to slice notation"""



More information about the Scipy-svn mailing list