From 5b9984de11667880954ffceada40c94000fb1df6 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:24:43 +0100 Subject: [PATCH] Widen absolute error threshold default to 1e-3 --- policyengine_core/tools/test_runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/policyengine_core/tools/test_runner.py b/policyengine_core/tools/test_runner.py index 4ef3024b..5400cddf 100644 --- a/policyengine_core/tools/test_runner.py +++ b/policyengine_core/tools/test_runner.py @@ -22,6 +22,7 @@ ) from policyengine_core.scripts import build_tax_benefit_system from policyengine_core.reforms import Reform, set_parameter +from policyengine_core.populations import ADD, DIVIDE log = logging.getLogger(__name__) @@ -464,7 +465,7 @@ def assert_near( import numpy as np if absolute_error_margin is None and relative_error_margin is None: - absolute_error_margin = 0 + absolute_error_margin = 1e-3 if not isinstance(value, np.ndarray): value = np.array(value) if isinstance(value, EnumArray):