From a06a5edacad29beb9972e1a82ecde6bc40d3d88a Mon Sep 17 00:00:00 2001 From: Johannes Schumann <johannes.schumann@fau.de> Date: Wed, 15 Dec 2021 17:54:12 +0100 Subject: [PATCH] Modify tolerance in tests --- km3buu/tests/test_physics.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/km3buu/tests/test_physics.py b/km3buu/tests/test_physics.py index 1303824..644b810 100644 --- a/km3buu/tests/test_physics.py +++ b/km3buu/tests/test_physics.py @@ -39,9 +39,11 @@ class TestVisEnergyParticle(unittest.TestCase): for i, pdgid in enumerate(self.particles): vfunc = np.vectorize(visible_energy_fraction) val = vfunc(pdgid, self.ref_values[0, :]) - np.testing.assert_array_almost_equal(self.ref_values[i + 1, :], - val, - decimal=3) + assert np.allclose(self.ref_values[i + 1, :], + val, + rtol=0.05, + atol=0.01) + class TestVisEnergyWeightFunctions(unittest.TestCase): def setUp(self): -- GitLab