From e169de7ee76a547a291f4b1bb6346a153f558b93 Mon Sep 17 00:00:00 2001 From: stephanbreimann Date: Tue, 9 Apr 2024 18:44:01 +0200 Subject: [PATCH] Update plot_legend test --- tests/unit/plotting_tests/test_plot_legend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/plotting_tests/test_plot_legend.py b/tests/unit/plotting_tests/test_plot_legend.py index ac7c5da6..70af7369 100644 --- a/tests/unit/plotting_tests/test_plot_legend.py +++ b/tests/unit/plotting_tests/test_plot_legend.py @@ -166,7 +166,7 @@ def test_plot_set_legend_n_cols(self, n_cols): @given(st.lists(st.text(), min_size=2, max_size=5)) def test_plot_set_legend_custom_labels(self, labels): fig, ax = plt.subplots() - labels = list(set(labels)) + labels = list(set([x for x in labels if len(x) > 1])) ax = aa.plot_legend(ax=ax, dict_color={label: "red" for label in labels}) legend_labels = [text.get_text() for text in ax.get_legend().get_texts()] assert set(legend_labels) == set(labels)