diff options
Diffstat (limited to 'numpy/polynomial/tests/test_classes.py')
-rw-r--r-- | numpy/polynomial/tests/test_classes.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py index 2261f960b..e9f256cf8 100644 --- a/numpy/polynomial/tests/test_classes.py +++ b/numpy/polynomial/tests/test_classes.py @@ -3,8 +3,6 @@ This tests the convert and cast methods of all the polynomial classes. """ -from __future__ import division, absolute_import, print_function - import operator as op from numbers import Number @@ -15,7 +13,6 @@ from numpy.polynomial import ( from numpy.testing import ( assert_almost_equal, assert_raises, assert_equal, assert_, ) -from numpy.compat import long from numpy.polynomial.polyutils import RankWarning # @@ -44,7 +41,7 @@ def assert_poly_almost_equal(p1, p2, msg=""): assert_(np.all(p1.window == p2.window)) assert_almost_equal(p1.coef, p2.coef) except AssertionError: - msg = "Result: %s\nTarget: %s", (p1, p2) + msg = f"Result: {p1}\nTarget: {p2}" raise AssertionError(msg) @@ -317,7 +314,7 @@ def test_truediv(Poly): s = stype(5) assert_poly_almost_equal(op.truediv(p2, s), p1) assert_raises(TypeError, op.truediv, s, p2) - for stype in (int, long, float): + for stype in (int, float): s = stype(5) assert_poly_almost_equal(op.truediv(p2, s), p1) assert_raises(TypeError, op.truediv, s, p2) @@ -574,7 +571,7 @@ def test_ufunc_override(Poly): -class TestLatexRepr(object): +class TestLatexRepr: """Test the latex repr used by ipython """ def as_latex(self, obj): @@ -628,7 +625,7 @@ class TestLatexRepr(object): # -class TestInterpolate(object): +class TestInterpolate: def f(self, x): return x * (x - 1) * (x - 2) |