From 8d334b01a5271a41ebd152584367764ad25ed8ed Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 4 Jan 2023 21:00:54 -0800 Subject: [PATCH] TST: Add fixture to avoid issue with randomizing test order. --- numpy/polynomial/tests/test_printing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/numpy/polynomial/tests/test_printing.py b/numpy/polynomial/tests/test_printing.py index 990a0d179f35..6f2a5092d722 100644 --- a/numpy/polynomial/tests/test_printing.py +++ b/numpy/polynomial/tests/test_printing.py @@ -478,6 +478,10 @@ class TestPrintOptions: are too small or too large. """ + @pytest.fixture(scope='class', autouse=True) + def use_ascii(self): + poly.set_default_printstyle('ascii') + def test_str(self): p = poly.Polynomial([1/2, 1/7, 1/7*10**8, 1/7*10**9]) assert_equal(str(p), '0.5 + 0.14285714 x + 14285714.28571429 x**2 '