summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests')
-rw-r--r--numpy/polynomial/tests/test_chebyshev.py8
-rw-r--r--numpy/polynomial/tests/test_polynomial.py8
2 files changed, 12 insertions, 4 deletions
diff --git a/numpy/polynomial/tests/test_chebyshev.py b/numpy/polynomial/tests/test_chebyshev.py
index 981481ff1..8ae1dee6f 100644
--- a/numpy/polynomial/tests/test_chebyshev.py
+++ b/numpy/polynomial/tests/test_chebyshev.py
@@ -139,8 +139,12 @@ class TestCalculus(TestCase) :
assert_raises(ValueError, ch.chebint, [0], .5)
assert_raises(ValueError, ch.chebint, [0], -1)
assert_raises(ValueError, ch.chebint, [0], 1, [0,0])
- assert_raises(ValueError, ch.chebint, [0], 1, lbnd=[0,0])
- assert_raises(ValueError, ch.chebint, [0], 1, scl=[0,0])
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = ch.chebint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
# check single integration with integration constant
for i in range(5) :
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py
index 4bfbc46d9..3a3f26861 100644
--- a/numpy/polynomial/tests/test_polynomial.py
+++ b/numpy/polynomial/tests/test_polynomial.py
@@ -124,8 +124,12 @@ class TestCalculus(TestCase) :
assert_raises(ValueError, poly.polyint, [0], .5)
assert_raises(ValueError, poly.polyint, [0], -1)
assert_raises(ValueError, poly.polyint, [0], 1, [0,0])
- assert_raises(ValueError, poly.polyint, [0], 1, lbnd=[0,0])
- assert_raises(ValueError, poly.polyint, [0], 1, scl=[0,0])
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = poly.polyint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
# check single integration with integration constant
for i in range(5) :