summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_regression.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-02-20 22:31:25 +0000
committerCharles Harris <charlesr.harris@gmail.com>2010-02-20 22:31:25 +0000
commit051165fb4557b67a1f50e81ad8cfb99efeeb0641 (patch)
tree01d6eec23902c1f0096f1dd8fef112810c72a1f7 /numpy/lib/tests/test_regression.py
parent8f2413a2e2ac19e699c9fd6a0344fcb845abc1d2 (diff)
downloadnumpy-051165fb4557b67a1f50e81ad8cfb99efeeb0641.tar.gz
DEP: Fix deprecation warnings in Python 3.1. The warnings come from the unittest
module. The fix should be good for Python >= 2.4 and used the following sed script: s/\<failUnless\>/assertTrue/g s/\<failIf\>/assertFalse/g s/\<failUnlessEqual\>/assertEqual/g s/\<failUnlessRaises\>/assertRaises/g
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r--numpy/lib/tests/test_regression.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py
index 5bdb0106f..d611c067d 100644
--- a/numpy/lib/tests/test_regression.py
+++ b/numpy/lib/tests/test_regression.py
@@ -48,7 +48,7 @@ class TestRegression(TestCase):
def test_poly1d_nan_roots(self, level=rlevel):
"""Ticket #396"""
p = np.poly1d([np.nan,np.nan,1], r=0)
- self.failUnlessRaises(np.linalg.LinAlgError,getattr,p,"r")
+ self.assertRaises(np.linalg.LinAlgError,getattr,p,"r")
def test_mem_polymul(self, level=rlevel):
"""Ticket #448"""
@@ -146,8 +146,8 @@ class TestRegression(TestCase):
a = np.ones((n,)*5)
i = np.random.randint(0,n,size=thesize)
g = a[np.ix_(i,i,i,i,i)]
- self.failUnlessRaises(ValueError, dp)
- self.failUnlessRaises(ValueError, dp2)
+ self.assertRaises(ValueError, dp)
+ self.assertRaises(ValueError, dp2)
def test_void_coercion(self, level=rlevel):
dt = np.dtype([('a','f4'),('b','i4')])