From 2447b538756d8c562380a7a6497bee5db21c5e6e Mon Sep 17 00:00:00 2001 From: GuiMacielPereira Date: Thu, 28 Sep 2023 16:18:58 +0100 Subject: [PATCH] Made the unit test function clearer --- tests/cut_plot_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cut_plot_test.py b/tests/cut_plot_test.py index 821707bd..7a092561 100644 --- a/tests/cut_plot_test.py +++ b/tests/cut_plot_test.py @@ -112,6 +112,8 @@ def test_update_legend_with_line_data(self): self.axes.get_legend_handles_labels = MagicMock(return_value=( [mock_line, another_mock_line], ['mock_label', 'another_mock_label'] )) + self.cut_plot._legends_shown = True + self.cut_plot.update_legend(line_data) self.assertEqual(self.cut_plot._legends_visible, [2, 0]) self.axes.legend.assert_called_with([mock_line], ['visible_line_data_label'], fontsize=ANY)