Skip to content

Commit

Permalink
test(processing): reduce tolerance for comparing dictionaries
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
ns-rse committed Jan 6, 2025
1 parent b353a4a commit 059ed39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 059ed39

Please sign in to comment.