Skip to content

Commit

Permalink
Merge pull request #22969 from charris/backport-22931
Browse files Browse the repository at this point in the history
TST: Add fixture to avoid issue with randomizing test order.
  • Loading branch information
charris committed Jan 9, 2023
2 parents 847c538 + 8d334b0 commit 5c0f8fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions numpy/polynomial/tests/test_printing.py
Expand Up @@ -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 '
Expand Down

0 comments on commit 5c0f8fe

Please sign in to comment.