add test for merging plot ids across config files

This commit is contained in:
dberenbaum
2023-09-14 10:36:46 -04:00
committed by Dave Berenbaum
parent ee367dcb1b
commit e1599ae280
+13 -1
View File
@@ -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}