Index: scipy_core/scipy_test/testing.py
===================================================================
RCS file: /home/cvsroot/world/scipy_core/scipy_test/testing.py,v
retrieving revision 1.49
diff -c -r1.49 testing.py
*** scipy_core/scipy_test/testing.py	1 Dec 2004 07:08:51 -0000	1.49
--- scipy_core/scipy_test/testing.py	7 Dec 2004 18:24:26 -0000
***************
*** 41,48 ****
      from Numeric import alltrue,equal,shape,ravel,around,zeros,Float64,asarray,\
           less_equal,array2string,less
      # `import scipy_base.fastumath as math` must be at the end of this file.
  except ImportError,msg:
!     print msg
  
  DEBUG = 0
  
--- 41,50 ----
      from Numeric import alltrue,equal,shape,ravel,around,zeros,Float64,asarray,\
           less_equal,array2string,less
      # `import scipy_base.fastumath as math` must be at the end of this file.
+     import scipy_base as _sb
  except ImportError,msg:
!     # print msg
!     raise
  
  DEBUG = 0
  
***************
*** 644,650 ****
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert desired == actual, msg
  
  __all__.append('assert_almost_equal')
  def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=1):
--- 646,652 ----
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert _sb.all(desired == actual), msg
  
  __all__.append('assert_almost_equal')
  def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=1):
***************
*** 661,667 ****
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert round(abs(desired - actual),decimal) == 0, msg
  
  __all__.append('assert_approx_equal')
  def assert_approx_equal(actual,desired,significant=7,err_msg='',verbose=1):
--- 663,669 ----
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert _sb.all(around(abs(desired - actual),decimal) == 0), msg
  
  __all__.append('assert_approx_equal')
  def assert_approx_equal(actual,desired,significant=7,err_msg='',verbose=1):
***************
*** 692,698 ****
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert math.fabs(sc_desired - sc_actual) < pow(10.,-1*significant), msg
  
  
  __all__.append('assert_array_equal')
--- 694,700 ----
          msg =  msg \
               + 'DESIRED: ' + repr(desired) \
               + '\nACTUAL: ' + repr(actual)
!     assert _sb.all(math.fabs(sc_desired - sc_actual) < pow(10.,-1*significant)), msg
  
  
  __all__.append('assert_array_equal')
***************
*** 702,712 ****
      try:
          assert 0 in [len(shape(x)),len(shape(y))] \
                 or (len(shape(x))==len(shape(y)) and \
!                    alltrue(equal(shape(x),shape(y)))),\
                     msg + ' (shapes %s, %s mismatch):\n\t' \
                     % (shape(x),shape(y)) + err_msg
          reduced = ravel(equal(x,y))
!         cond = alltrue(reduced)
          if not cond:
              s1 = array2string(x,precision=16)
              s2 = array2string(y,precision=16)
--- 704,714 ----
      try:
          assert 0 in [len(shape(x)),len(shape(y))] \
                 or (len(shape(x))==len(shape(y)) and \
!                    _sb.all(equal(shape(x),shape(y)))),\
                     msg + ' (shapes %s, %s mismatch):\n\t' \
                     % (shape(x),shape(y)) + err_msg
          reduced = ravel(equal(x,y))
!         cond = _sb.all(reduced)
          if not cond:
              s1 = array2string(x,precision=16)
              s2 = array2string(y,precision=16)
***************
*** 725,737 ****
      y = asarray(y)
      msg = '\nArrays are not almost equal'
      try:
!         cond = alltrue(equal(shape(x),shape(y)))
          if not cond:
              msg = msg + ' (shapes mismatch):\n\t'\
                    'Shape of array 1: %s\n\tShape of array 2: %s' % (shape(x),shape(y))
          assert cond, msg + '\n\t' + err_msg
          reduced = ravel(equal(less_equal(around(abs(x-y),decimal),10.0**(-decimal)),1))
!         cond = alltrue(reduced)
          if not cond:
              s1 = array2string(x,precision=decimal+1)
              s2 = array2string(y,precision=decimal+1)
--- 727,739 ----
      y = asarray(y)
      msg = '\nArrays are not almost equal'
      try:
!         cond = _sb.all(equal(shape(x),shape(y)))
          if not cond:
              msg = msg + ' (shapes mismatch):\n\t'\
                    'Shape of array 1: %s\n\tShape of array 2: %s' % (shape(x),shape(y))
          assert cond, msg + '\n\t' + err_msg
          reduced = ravel(equal(less_equal(around(abs(x-y),decimal),10.0**(-decimal)),1))
!         cond = _sb.all(reduced)
          if not cond:
              s1 = array2string(x,precision=decimal+1)
              s2 = array2string(y,precision=decimal+1)
***************
*** 752,761 ****
      x,y = asarray(x), asarray(y)
      msg = '\nArrays are not less-ordered'
      try:
!         assert alltrue(equal(shape(x),shape(y))),\
                 msg + ' (shapes mismatch):\n\t' + err_msg
          reduced = ravel(less(x,y))
!         cond = alltrue(reduced)
          if not cond:
              s1 = array2string(x,precision=16)
              s2 = array2string(y,precision=16)
--- 754,763 ----
      x,y = asarray(x), asarray(y)
      msg = '\nArrays are not less-ordered'
      try:
!         assert _sb.all(equal(shape(x),shape(y))),\
                 msg + ' (shapes mismatch):\n\t' + err_msg
          reduced = ravel(less(x,y))
!         cond = _sb.all(reduced)
          if not cond:
              s1 = array2string(x,precision=16)
              s2 = array2string(y,precision=16)
