[Scipy-svn] r4677 - trunk/scipy/weave/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Aug 28 22:01:20 EDT 2008
Author: alan.mcintyre
Date: 2008-08-28 21:01:12 -0500 (Thu, 28 Aug 2008)
New Revision: 4677
Modified:
trunk/scipy/weave/tests/test_c_spec.py
trunk/scipy/weave/tests/test_numpy_scalar_spec.py
trunk/scipy/weave/tests/test_slice_handler.py
trunk/scipy/weave/tests/test_standard_array_spec.py
trunk/scipy/weave/tests/weave_test_utils.py
Log:
Remove redundant identical definitions of print_assert_equal (this function is now
available from numpy.testing).
Modified: trunk/scipy/weave/tests/test_c_spec.py
===================================================================
--- trunk/scipy/weave/tests/test_c_spec.py 2008-08-25 16:51:35 UTC (rev 4676)
+++ trunk/scipy/weave/tests/test_c_spec.py 2008-08-29 02:01:12 UTC (rev 4677)
@@ -27,22 +27,6 @@
out = out.replace("\n","")
return out
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- import pprint
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
#----------------------------------------------------------------------------
# Scalar conversion test classes
# int, float, complex
Modified: trunk/scipy/weave/tests/test_numpy_scalar_spec.py
===================================================================
--- trunk/scipy/weave/tests/test_numpy_scalar_spec.py 2008-08-25 16:51:35 UTC (rev 4676)
+++ trunk/scipy/weave/tests/test_numpy_scalar_spec.py 2008-08-29 02:01:12 UTC (rev 4677)
@@ -28,22 +28,6 @@
out = out.replace("\n","")
return out
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- import pprint
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
#----------------------------------------------------------------------------
# Scalar conversion test classes
# int, float, complex
Modified: trunk/scipy/weave/tests/test_slice_handler.py
===================================================================
--- trunk/scipy/weave/tests/test_slice_handler.py 2008-08-25 16:51:35 UTC (rev 4676)
+++ trunk/scipy/weave/tests/test_slice_handler.py 2008-08-29 02:01:12 UTC (rev 4677)
@@ -1,27 +1,9 @@
-
from numpy.testing import *
from scipy.weave import slice_handler
from scipy.weave.slice_handler import indexed_array_pattern
from scipy.weave.ast_tools import *
-
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- import pprint
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
class TestBuildSliceAtom(TestCase):
def generic_check(self,slice_vars,desired):
pos = slice_vars['pos']
Modified: trunk/scipy/weave/tests/test_standard_array_spec.py
===================================================================
--- trunk/scipy/weave/tests/test_standard_array_spec.py 2008-08-25 16:51:35 UTC (rev 4676)
+++ trunk/scipy/weave/tests/test_standard_array_spec.py 2008-08-29 02:01:12 UTC (rev 4677)
@@ -1,4 +1,3 @@
-
from numpy import *
from numpy.testing import *
@@ -10,22 +9,6 @@
out = out.replace("\n","")
return out
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- import pprint
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
class TestArrayConverter(TestCase):
def test_type_match_string(self):
s = standard_array_spec.array_converter()
Modified: trunk/scipy/weave/tests/weave_test_utils.py
===================================================================
--- trunk/scipy/weave/tests/weave_test_utils.py 2008-08-25 16:51:35 UTC (rev 4676)
+++ trunk/scipy/weave/tests/weave_test_utils.py 2008-08-29 02:01:12 UTC (rev 4677)
@@ -9,21 +9,6 @@
out = out.replace("\n","")
return out
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
###################################################
# mainly used by catalog tests
###################################################
More information about the Scipy-svn
mailing list