File: Use-atol-instead-of-for-minuit-test.patch

package info (click to toggle)
gammapy 2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,284 kB
  • sloc: python: 81,729; makefile: 228; sh: 11; javascript: 10
file content (24 lines) | stat: -rw-r--r-- 952 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Ole Streicher <olebole@debian.org>
Date: Tue, 7 Jun 2022 10:44:31 +0200
Subject: Use atol instead of for minuit test

This fixes FTBFS on 32-bit systems
---
 gammapy/modeling/tests/test_fit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gammapy/modeling/tests/test_fit.py b/gammapy/modeling/tests/test_fit.py
index 8a5ea07..5f7879f 100644
--- a/gammapy/modeling/tests/test_fit.py
+++ b/gammapy/modeling/tests/test_fit.py
@@ -247,8 +247,8 @@ def test_run_linked(backend):
         [1.69728073e-30, 1.00000000e00, 3.56230294e-15],
         [4.76456033e-16, 3.56230294e-15, 1.00000000e00],
     ]
-    assert_allclose(dataset.models[0].covariance.data, expected)
-    assert_allclose(dataset.models[1].covariance.data, expected)
+    assert_allclose(dataset.models[0].covariance.data, expected, atol=1e-12)
+    assert_allclose(dataset.models[1].covariance.data, expected, atol=1e-12)
 
 
 @requires_dependency("sherpa")