Commit dc2297dd authored by Tom Clayton's avatar Tom Clayton
Browse files

Fixes for plot and project saver tests RE #30315

parent f00539ec
......@@ -78,7 +78,8 @@ class PlotsSaver(object):
continue
axes_list.append(self.get_dict_for_axes(ax))
self._add_normalisation_kwargs(create_list, axes_list)
if create_list and axes_list:
self._add_normalisation_kwargs(create_list, axes_list)
fig_dict = {"creationArguments": create_list,
"axes": axes_list,
"label": fig._label,
......
......@@ -135,7 +135,8 @@ class PlotsSaverTest(unittest.TestCase):
self.fig.axes[0].creation_args = [{u"specNum": 2, "function": "plot"}]
return_value = self.plot_saver.get_dict_from_fig(self.fig)
self.loader_plot_dict[u'creationArguments'] = [[{u"specNum": 2, "function": "plot"}]]
self.loader_plot_dict[u'creationArguments'] = [[{u"specNum": 2, "function": "plot", u"normalize_by_bin_width":
True}]]
self.maxDiff = None
self.assertDictEqual(return_value, self.loader_plot_dict)
......@@ -144,6 +145,7 @@ class PlotsSaverTest(unittest.TestCase):
self.plot_saver.figure_creation_args = [{"function": "plot"}]
return_value = self.plot_saver.get_dict_for_axes(self.fig.axes[0])
self.loader_plot_dict["axes"][0]['_is_norm'] = True
expected_value = self.loader_plot_dict["axes"][0]
self.maxDiff = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment