Skip to content

Commit

Permalink
Made the unit test function clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiMacielPereira committed Sep 28, 2023
1 parent d6caf7d commit 2447b53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/cut_plot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2447b53

Please sign in to comment.