示例#1
0
 def test_plotBin_calls_plot_with_waterfall(self, plot_mock):
     ws_name = 'test_plotBin_calls_plot_with_waterfall-1'
     wksp_indices = list(range(10))
     plotBin(ws_name, wksp_indices, waterfall=True)
     plot_mock.assert_called_once_with(
         [ws_name],
         wksp_indices=wksp_indices,
         errors=False,
         waterfall=True,
         fig=None,
         overplot=False,
         plot_kwargs={'axis': MantidAxType.BIN})
示例#2
0
 def test_plotBin_calls_plot_with_errors(self, plot_mock):
     ws_name = 'test_plotBin_calls_plot_with_a_string-1'
     wksp_indices = 0
     plotBin(ws_name, wksp_indices, error_bars=True)
     plot_mock.assert_called_once_with(
         [ws_name],
         wksp_indices=[wksp_indices],
         errors=True,
         waterfall=None,
         fig=None,
         overplot=False,
         plot_kwargs={'axis': MantidAxType.BIN})
示例#3
0
 def test_plotBin_calls_plot_with_overplot(self, plot_mock):
     ws_name = 'test_plotBin_calls_plot_with_overplot-1'
     wksp_indices = list(range(10))
     fake_window = "this is a string representing a fake plotting window"
     plotBin(ws_name, wksp_indices, window=fake_window)
     plot_mock.assert_called_once_with(
         [ws_name],
         wksp_indices=wksp_indices,
         errors=False,
         waterfall=None,
         fig=fake_window,
         overplot=True,
         plot_kwargs={'axis': MantidAxType.BIN})
示例#4
0
 def test_plotBin_calls_plot_with_no_line(self, plot_mock):
     ws_name = 'test_plotBin_calls_plot_with_no_line-1'
     wksp_indices = list(range(10))
     plotBin(ws_name, wksp_indices, type=1)
     plot_mock.assert_called_once_with([ws_name],
                                       wksp_indices=wksp_indices,
                                       errors=False,
                                       waterfall=None,
                                       fig=None,
                                       overplot=False,
                                       plot_kwargs={
                                           'axis': MantidAxType.BIN,
                                           'linestyle': 'None',
                                           'marker': '.'
                                       })
示例#5
0
 def test_plotBin_calls_plot_with_a_list(self, plot_mock):
     ws_name = [
         'test_plotBin_calls_plot_with_a_list-1',
         'test_plotBin_calls_plot_with_a_list'
     ]
     wksp_indices = list(range(10))
     plotBin(ws_name, wksp_indices)
     plot_mock.assert_called_once_with(
         ws_name,
         wksp_indices=wksp_indices,
         errors=False,
         waterfall=None,
         fig=None,
         overplot=False,
         plot_kwargs={'axis': MantidAxType.BIN})