From 2cc1f92e9087c955599e87612fd1cd85389c2bdf Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 29 Dec 2021 21:47:41 +0000 Subject: BUG: Add test for scalarprint bugfix --- numpy/core/tests/test_scalarprint.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy') diff --git a/numpy/core/tests/test_scalarprint.py b/numpy/core/tests/test_scalarprint.py index ee21d4aa5..b1d158ddc 100644 --- a/numpy/core/tests/test_scalarprint.py +++ b/numpy/core/tests/test_scalarprint.py @@ -306,6 +306,8 @@ class TestRealScalars: assert_equal(fpos(tp('1.2'), unique=False, precision=4, trim='-'), "1.2" if tp != np.float16 else "1.2002") assert_equal(fpos(tp('1.'), trim='-'), "1") + assert_equal(fpos(tp('1.001'), unique=False, precision=1, trim='-'), + "1") @pytest.mark.skipif(not platform.machine().startswith("ppc64"), reason="only applies to ppc float128 values") -- cgit v1.2.1