diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-06-17 00:23:20 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-06-17 00:23:20 +0000 |
commit | c331857d8663ecf54bbe88c834755da749e8ab52 (patch) | |
tree | f4cc69ec328a5ff4d3b108f3610acb119a196493 /numpy/lib/tests/test_polynomial.py | |
parent | 22ba7886a84dc6a16ca75871f7cd2f10ef8de1f9 (diff) | |
download | numpy-c331857d8663ecf54bbe88c834755da749e8ab52.tar.gz |
Switched to use nose to run tests. Added test and bench functions to all modules.
Diffstat (limited to 'numpy/lib/tests/test_polynomial.py')
-rw-r--r-- | numpy/lib/tests/test_polynomial.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py index 012f49d77..3bd002cc0 100644 --- a/numpy/lib/tests/test_polynomial.py +++ b/numpy/lib/tests/test_polynomial.py @@ -76,13 +76,14 @@ poly1d([ 2.]) from numpy.testing import * import numpy as np -class TestDocs(NumpyTestCase): - def check_doctests(self): return self.rundocs() +class TestDocs(TestCase): + def test_doctests(self): + return rundocs() - def check_roots(self): + def test_roots(self): assert_array_equal(np.roots([1,0,0]), [0,0]) - def check_str_leading_zeros(self): + def test_str_leading_zeros(self): p = np.poly1d([4,3,2,1]) p[3] = 0 assert_equal(str(p), @@ -94,7 +95,7 @@ class TestDocs(NumpyTestCase): p[1] = 0 assert_equal(str(p), " \n0") - def check_polyfit(self) : + def test_polyfit(self) : c = np.array([3., 2., 1.]) x = np.linspace(0,2,5) y = np.polyval(c,x) @@ -109,5 +110,6 @@ class TestDocs(NumpyTestCase): cc = np.concatenate((c,c), axis=1) assert_almost_equal(cc, np.polyfit(x,yy,2)) + if __name__ == "__main__": - NumpyTest().run() + nose.run(argv=['', __file__]) |