Exemple #1
0
 def test_get_plot_command_kwargs_calls_get_errorbar_command_kwargs_if_errorbars_visible(
         self, mock_plot_cmd_2d, mock_plot_cmd_err, mock_mantid_spec_cmd):
     mock_artist = Mock(spec=ErrorbarContainer)
     with patch(ERRORBARS_HIDDEN_FUNC, lambda x: False):
         get_plot_command_kwargs(mock_artist)
     self.assertEqual(0, mock_plot_cmd_2d.call_count)
     mock_plot_cmd_err.assert_called_once_with(mock_artist)
Exemple #2
0
 def test_get_plot_command_kwargs_calls_get_plot_command_kwargs_2d_if_errorbars_hidden(
         self, mock_plot_cmd_2d, mock_plot_cmd_err, mock_mantid_spec_cmd):
     mock_error_line = Mock()
     mock_artist = Mock(spec=ErrorbarContainer,
                        __getitem__=lambda x, y: mock_error_line)
     with patch(ERRORBARS_HIDDEN_FUNC, lambda x: True):
         get_plot_command_kwargs(mock_artist)
     self.assertEqual(0, mock_plot_cmd_err.call_count)
     mock_plot_cmd_2d.assert_called_once_with(mock_error_line)