diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 21:00:10 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 21:02:29 -0600 |
commit | 966038e30b21e62ab7729527f3f0bba6e18eb805 (patch) | |
tree | 084bd7b40be49614b3770657ceaf1b539adbf964 /numpy/lib/tests/test_polynomial.py | |
parent | 4cb2eb4df95740661d7f1944451d2c1cb3482bcf (diff) | |
download | numpy-966038e30b21e62ab7729527f3f0bba6e18eb805.tar.gz |
STY: Replace assert by assert_ in tests. There remain 124 uses of
assert in non-testing files that should be checked for correctness.
Diffstat (limited to 'numpy/lib/tests/test_polynomial.py')
-rw-r--r-- | numpy/lib/tests/test_polynomial.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py index 2dbffa0b8..8c3a6d62b 100644 --- a/numpy/lib/tests/test_polynomial.py +++ b/numpy/lib/tests/test_polynomial.py @@ -117,25 +117,25 @@ class TestDocs(TestCase): from decimal import Decimal p = np.poly1d([Decimal('4.0'), Decimal('3.0'), Decimal('2.0')]) p2 = p * Decimal('1.333333333333333') - assert p2[1] == Decimal("3.9999999999999990") + assert_(p2[1] == Decimal("3.9999999999999990")) p2 = p.deriv() - assert p2[1] == Decimal('8.0') + assert_(p2[1] == Decimal('8.0')) p2 = p.integ() - assert p2[3] == Decimal("1.333333333333333333333333333") - assert p2[2] == Decimal('1.5') - assert np.issubdtype(p2.coeffs.dtype, np.object_) + assert_(p2[3] == Decimal("1.333333333333333333333333333")) + assert_(p2[2] == Decimal('1.5')) + assert_(np.issubdtype(p2.coeffs.dtype, np.object_)) def test_complex(self): p = np.poly1d([3j, 2j, 1j]) p2 = p.integ() - assert (p2.coeffs == [1j,1j,1j,0]).all() + assert_((p2.coeffs == [1j,1j,1j,0]).all()) p2 = p.deriv() - assert (p2.coeffs == [6j,2j]).all() + assert_((p2.coeffs == [6j,2j]).all()) def test_integ_coeffs(self): p = np.poly1d([3,2,1]) p2 = p.integ(3, k=[9,7,6]) - assert (p2.coeffs == [1/4./5.,1/3./4.,1/2./3.,9/1./2.,7,6]).all() + assert_((p2.coeffs == [1/4./5.,1/3./4.,1/2./3.,9/1./2.,7,6]).all()) def test_zero_dims(self): try: |