From 059ed396880a674cc440c8ed24968da6259c43ef Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 6 Jan 2025 14:05:48 +0000 Subject: [PATCH] test(processing): reduce tolerance for comparing dictionaries Found the CI tests were failing due to small differences, but larger than the default (`1e-9`) tolerance to `dict_almost_equal()` reducing to `1e-6`. --- tests/test_processing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_processing.py b/tests/test_processing.py index 5a7f1a62f63..71d0aad8910 100644 --- a/tests/test_processing.py +++ b/tests/test_processing.py @@ -25,6 +25,8 @@ BASE_DIR = Path.cwd() RESOURCES = BASE_DIR / "tests/resources" +# pylint: disable=too-many-positional-arguments + # Can't see a way of parameterising with pytest-regtest as it writes to a file based on the file/function # so instead we run three regression tests. @@ -202,7 +204,7 @@ def test_process_scan_both(regtest, tmp_path, process_scan_config: dict, load_sc # Check the keys, this will flag all new keys when adding output stats assert expected_topostats.keys() == saved_topostats.keys() # Check the data - assert dict_almost_equal(expected_topostats, saved_topostats) + assert dict_almost_equal(expected_topostats, saved_topostats, abs_tol=1e-6) @pytest.mark.parametrize(