From 13e38771849c563aff9d909c1172ef7f46d7f212 Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Fri, 7 Jun 2024 00:06:35 -0700 Subject: [PATCH] test(backport): Lower tolerance for iminuit v2.26.0+ on Apple silicon (#2515) * Backport PR https://github.com/scikit-hep/pyhf/pull/2514 * Lower the tolerance for the tests/test_optim.py test_optim_uncerts test to reach agreement for iminuit v2.26.0+ on Apple silicon. Co-authored-by: Matthew Feickert --- tests/test_optim.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_optim.py b/tests/test_optim.py index d235cfe27e..cc2736337f 100644 --- a/tests/test_optim.py +++ b/tests/test_optim.py @@ -385,7 +385,9 @@ def test_optim_uncerts(backend, source, spec, mu): return_uncertainties=True, ) assert result.shape == (2, 2) - assert pytest.approx([0.26418431, 0.0]) == pyhf.tensorlib.tolist(result[:, 1]) + assert pytest.approx([0.26418431, 0.0], rel=1e-5) == pyhf.tensorlib.tolist( + result[:, 1] + ) @pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])