diff options
Diffstat (limited to 'numpy/polynomial/tests')
-rw-r--r-- | numpy/polynomial/tests/test_chebyshev.py | 8 | ||||
-rw-r--r-- | numpy/polynomial/tests/test_polynomial.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/numpy/polynomial/tests/test_chebyshev.py b/numpy/polynomial/tests/test_chebyshev.py index 2278ca871..d61e8b07c 100644 --- a/numpy/polynomial/tests/test_chebyshev.py +++ b/numpy/polynomial/tests/test_chebyshev.py @@ -420,11 +420,11 @@ class TestChebyshevClass(TestCase) : def test_truncate(self) : assert_raises(ValueError, self.p1.truncate, .5) - assert_raises(ValueError, self.p1.truncate, -1) + assert_raises(ValueError, self.p1.truncate, 0) + assert_equal(len(self.p1.truncate(4)), 3) assert_equal(len(self.p1.truncate(3)), 3) - assert_equal(len(self.p1.truncate(2)), 3) - assert_equal(len(self.p1.truncate(1)), 2) - assert_equal(len(self.p1.truncate(0)), 1) + assert_equal(len(self.p1.truncate(2)), 2) + assert_equal(len(self.p1.truncate(1)), 1) def test_copy(self) : p = self.p1.copy() diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py index 13718fe9e..530e5d949 100644 --- a/numpy/polynomial/tests/test_polynomial.py +++ b/numpy/polynomial/tests/test_polynomial.py @@ -391,11 +391,11 @@ class TestPolynomialClass(TestCase) : def test_truncate(self) : assert_raises(ValueError, self.p1.truncate, .5) - assert_raises(ValueError, self.p1.truncate, -1) + assert_raises(ValueError, self.p1.truncate, 0) + assert_equal(len(self.p1.truncate(4)), 3) assert_equal(len(self.p1.truncate(3)), 3) - assert_equal(len(self.p1.truncate(2)), 3) - assert_equal(len(self.p1.truncate(1)), 2) - assert_equal(len(self.p1.truncate(0)), 1) + assert_equal(len(self.p1.truncate(2)), 2) + assert_equal(len(self.p1.truncate(1)), 1) def test_copy(self) : p = self.p1.copy() |