diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2010-02-20 22:31:25 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2010-02-20 22:31:25 +0000 |
commit | 051165fb4557b67a1f50e81ad8cfb99efeeb0641 (patch) | |
tree | 01d6eec23902c1f0096f1dd8fef112810c72a1f7 /numpy/lib/tests/test_io.py | |
parent | 8f2413a2e2ac19e699c9fd6a0344fcb845abc1d2 (diff) | |
download | numpy-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_io.py')
-rw-r--r-- | numpy/lib/tests/test_io.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 2b4d542c7..385a6e7fb 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -1094,7 +1094,7 @@ M 33 21.99 test = np.recfromtxt(data, **kwargs) control = np.array([(0, 1), (2, 3)], dtype=[('A', np.int), ('B', np.int)]) - self.failUnless(isinstance(test, np.recarray)) + self.assertTrue(isinstance(test, np.recarray)) assert_equal(test, control) # data = StringIO('A,B\n0,1\n2,N/A') @@ -1114,7 +1114,7 @@ M 33 21.99 test = np.recfromcsv(data, dtype=None, **kwargs) control = np.array([(0, 1), (2, 3)], dtype=[('A', np.int), ('B', np.int)]) - self.failUnless(isinstance(test, np.recarray)) + self.assertTrue(isinstance(test, np.recarray)) assert_equal(test, control) # data = StringIO('A,B\n0,1\n2,N/A') @@ -1130,7 +1130,7 @@ M 33 21.99 test = np.recfromcsv(data, missing_values='N/A',) control = np.array([(0, 1), (2, 3)], dtype=[('a', np.int), ('b', np.int)]) - self.failUnless(isinstance(test, np.recarray)) + self.assertTrue(isinstance(test, np.recarray)) assert_equal(test, control) |