From 8d55eaa632045ddb7c20299197562e551166a9f3 Mon Sep 17 00:00:00 2001 From: Nicolas Mounet Date: Fri, 4 Jun 2021 14:55:22 +0200 Subject: [PATCH] Improving the reference values used for the test on the temperature time discretization (using a very fine mesh to compute the reference); decreasing the level of accuracy required for this test --- cara/tests/test_known_quantities.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cara/tests/test_known_quantities.py b/cara/tests/test_known_quantities.py index ab24bb08..d8597cf8 100644 --- a/cara/tests/test_known_quantities.py +++ b/cara/tests/test_known_quantities.py @@ -375,12 +375,13 @@ def test_quanta_hourly_dep(month,expected_quanta): npt.assert_allclose(quanta, expected_quanta) # expected quanta were computed with a trapezoidal integration, using -# a mesh of 100'000 pts per exposed presence interval. +# a mesh of 100'000 pts per exposed presence interval and 25 pts per hour +# for the temperature discretization. @pytest.mark.parametrize( "month, expected_quanta", [ - ['Jan', 9.989881], - ['Jun', 39.99636], + ['Jan', 9.993842], + ['Jun', 40.151985], ], ) def test_quanta_hourly_dep_refined(month,expected_quanta): @@ -393,4 +394,4 @@ def test_quanta_hourly_dep_refined(month,expected_quanta): ) ) quanta = m.quanta_exposure() - npt.assert_allclose(quanta, expected_quanta) + npt.assert_allclose(quanta, expected_quanta, rtol=0.02)