From ac6a0710caddc1f4682a932728da91ef2de63c2a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 23 Feb 2022 10:45:23 -0300 Subject: [PATCH] Improve coverage --- testing/python/approx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/python/approx.py b/testing/python/approx.py index 09566c142..2eec4e9f7 100644 --- a/testing/python/approx.py +++ b/testing/python/approx.py @@ -867,7 +867,10 @@ class TestApprox: return 4 expected = MySequence() - assert [1, 2, 3, 4] == approx(expected) + assert [1, 2, 3, 4] == approx(expected, abs=1e-4) + + expected_repr = "approx([1 ± 1.0e-06, 2 ± 2.0e-06, 3 ± 3.0e-06, 4 ± 4.0e-06])" + assert repr(approx(expected)) == expected_repr def test_allow_ordered_sequences_only(self) -> None: """pytest.approx() should raise an error on unordered sequences (#9692)."""