summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2011-03-13 19:38:54 -0600
committerCharles Harris <charlesr.harris@gmail.com>2011-03-13 19:38:54 -0600
commitbb70738f14caaa1bfd2478af283dd101d6931f17 (patch)
tree79a3e790275c6509cdf00b3feb5be7ecfa9f48b3
parent16041b5c012d60fe80da173059532ffb2d79c530 (diff)
downloadnumpy-bb70738f14caaa1bfd2478af283dd101d6931f17.tar.gz
ENH: Rename test_trimdeg to test_cutdeg to match method and add ability to
run as script.
-rw-r--r--numpy/polynomial/tests/test_chebyshev.py6
-rw-r--r--numpy/polynomial/tests/test_legendre.py6
-rw-r--r--numpy/polynomial/tests/test_polynomial.py6
3 files changed, 15 insertions, 3 deletions
diff --git a/numpy/polynomial/tests/test_chebyshev.py b/numpy/polynomial/tests/test_chebyshev.py
index 65bb877f4..21e4728bf 100644
--- a/numpy/polynomial/tests/test_chebyshev.py
+++ b/numpy/polynomial/tests/test_chebyshev.py
@@ -462,7 +462,7 @@ class TestChebyshevClass(TestCase) :
def test_degree(self) :
assert_equal(self.p1.degree(), 2)
- def test_trimdeg(self) :
+ def test_cutdeg(self) :
assert_raises(ValueError, self.p1.cutdeg, .5)
assert_raises(ValueError, self.p1.cutdeg, -1)
assert_equal(len(self.p1.cutdeg(3)), 3)
@@ -564,3 +564,7 @@ class TestChebyshevClass(TestCase) :
assert_almost_equal(p(x), x)
p = ch.Chebyshev.identity([1,3])
assert_almost_equal(p(x), x)
+#
+
+if __name__ == "__main__":
+ run_module_suite()
diff --git a/numpy/polynomial/tests/test_legendre.py b/numpy/polynomial/tests/test_legendre.py
index f963bd2df..a35e6605e 100644
--- a/numpy/polynomial/tests/test_legendre.py
+++ b/numpy/polynomial/tests/test_legendre.py
@@ -429,7 +429,7 @@ class TestLegendreClass(TestCase) :
def test_degree(self) :
assert_equal(self.p1.degree(), 2)
- def test_trimdeg(self) :
+ def test_cutdeg(self) :
assert_raises(ValueError, self.p1.cutdeg, .5)
assert_raises(ValueError, self.p1.cutdeg, -1)
assert_equal(len(self.p1.cutdeg(3)), 3)
@@ -531,3 +531,7 @@ class TestLegendreClass(TestCase) :
assert_almost_equal(p(x), x)
p = leg.Legendre.identity([1,3])
assert_almost_equal(p(x), x)
+#
+
+if __name__ == "__main__":
+ run_module_suite()
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py
index 5890ac13f..4b93ea118 100644
--- a/numpy/polynomial/tests/test_polynomial.py
+++ b/numpy/polynomial/tests/test_polynomial.py
@@ -400,7 +400,7 @@ class TestPolynomialClass(TestCase) :
def test_degree(self) :
assert_equal(self.p1.degree(), 2)
- def test_trimdeg(self) :
+ def test_cutdeg(self) :
assert_raises(ValueError, self.p1.cutdeg, .5)
assert_raises(ValueError, self.p1.cutdeg, -1)
assert_equal(len(self.p1.cutdeg(3)), 3)
@@ -502,3 +502,7 @@ class TestPolynomialClass(TestCase) :
assert_almost_equal(p(x), x)
p = poly.Polynomial.identity([1,3])
assert_almost_equal(p(x), x)
+#
+
+if __name__ == "__main__":
+ run_module_suite()