[Scipy-svn] r3514 - trunk/scipy/linalg/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Nov 12 23:04:57 EST 2007


Author: jarrod.millman
Date: 2007-11-12 22:04:54 -0600 (Mon, 12 Nov 2007)
New Revision: 3514

Modified:
   trunk/scipy/linalg/tests/test_basic.py
Log:
use NumpyTestCase rather than the one from unittest


Modified: trunk/scipy/linalg/tests/test_basic.py
===================================================================
--- trunk/scipy/linalg/tests/test_basic.py	2007-11-11 22:15:52 UTC (rev 3513)
+++ trunk/scipy/linalg/tests/test_basic.py	2007-11-13 04:04:54 UTC (rev 3514)
@@ -29,8 +29,6 @@
 from linalg import pinv, pinv2, solve_banded
 restore_path()
 
-import unittest
-
 def random(size):
     return rand(*size)
 
@@ -416,7 +414,7 @@
             #XXX: check definition of res
             assert_array_almost_equal(x,direct_lstsq(a,b,1))
 
-class test_tri(unittest.TestCase):
+class test_tri(NumpyTestCase):
     def check_basic(self):
         assert_equal(tri(4),array([[1,0,0,0],
                                    [1,1,0,0],
@@ -452,7 +450,7 @@
                                           [1,0,0],
                                           [1,1,0]]))
 
-class test_tril(unittest.TestCase):
+class test_tril(NumpyTestCase):
     def check_basic(self):
         a = (100*get_mat(5)).astype('l')
         b = a.copy()
@@ -474,7 +472,7 @@
                 b[k,l] = 0
         assert_equal(tril(a,k=-2),b)
 
-class test_triu(unittest.TestCase):
+class test_triu(NumpyTestCase):
     def check_basic(self):
         a = (100*get_mat(5)).astype('l')
         b = a.copy()
@@ -496,14 +494,14 @@
                 b[l,k] = 0
         assert_equal(triu(a,k=-2),b)
 
-class test_toeplitz(unittest.TestCase):
+class test_toeplitz(NumpyTestCase):
     def check_basic(self):
         y = toeplitz([1,2,3])
         assert_array_equal(y,[[1,2,3],[2,1,2],[3,2,1]])
         y = toeplitz([1,2,3],[1,4,5])
         assert_array_equal(y,[[1,4,5],[2,1,4],[3,2,1]])
 
-class test_hankel(unittest.TestCase):
+class test_hankel(NumpyTestCase):
     def check_basic(self):
         y = hankel([1,2,3])
         assert_array_equal(y,[[1,2,3],[2,3,0],[3,0,0]])




More information about the Scipy-svn mailing list