From e1599ae28011c5d89c53ec846b2559d6ef4b221e Mon Sep 17 00:00:00 2001 From: dberenbaum Date: Thu, 31 Aug 2023 18:49:01 -0400 Subject: [PATCH] add test for merging plot ids across config files --- tests/unit/render/test_match.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/unit/render/test_match.py b/tests/unit/render/test_match.py index 1ef714ff8..bdaa30c6c 100644 --- a/tests/unit/render/test_match.py +++ b/tests/unit/render/test_match.py @@ -129,7 +129,7 @@ def test_flat_datapoints_errors_are_caught(M, mocker): assert renderer_with_errors.definition_errors == {"v1": M.instance_of(ValueError)} -def test_squash_plots_properties(): +def test_squash_plots_properties_revs(): group = [ ("v3", "config_file", "plot_id", {"foo": 1}), ("v2", "config_file", "plot_id", {"foo": 2, "bar": 2}), @@ -139,3 +139,15 @@ def test_squash_plots_properties(): plot_properties = _squash_plots_properties(group) assert plot_properties == {"foo": 1, "bar": 2, "baz": 3} + + +def test_squash_plots_properties_config_files(): + group = [ + ("v1", "config_file1", "plot_id", {"foo": 1}), + ("v1", "config_file2", "plot_id", {"foo": 2, "bar": 2}), + ("v1", "config_file3", "plot_id", {"baz": 3}), + ] + + plot_properties = _squash_plots_properties(group) + + assert plot_properties == {"foo": 1, "bar": 2, "baz": 3}