Exemplo n.º 1
0
    def test_delete_plot_lines_with_plots_present(self):
        plotter = LinePlots(self.image_axes, self.mock_colorbar)
        xfig, yfig = MagicMock(), MagicMock()
        self.axx.plot.side_effect = [[xfig]]
        self.axy.plot.side_effect = [[yfig]]
        x, y = np.arange(10.), np.arange(10.)
        plotter.plot_x_line(x, y)
        plotter.plot_y_line(x, y)

        plotter.delete_line_plot_lines()

        xfig.remove.assert_called_once()
        yfig.remove.assert_called_once()
Exemplo n.º 2
0
    def test_delete_plot_lines_handles_empty_plots(self):
        plotter = LinePlots(self.image_axes, self.mock_colorbar)

        plotter.delete_line_plot_lines()