def test_ignore_zeros(self): self.data[:, 1] = 0 self.data[:, 3] = np.nan self.figs.append( dcs.plot_bar_breakdown(self.time, self.data, label=self.label, ignore_empties=True))
def test_bad_legend(self): with self.assertRaises(AssertionError): dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend[:-1])
def test_null_data(self): with dcs.capture_output() as out: dcs.plot_bar_breakdown(self.time, None, '') output = out.getvalue().strip() out.close() self.assertEqual(output, 'plot skipped due to missing data.')
def test_legend(self): self.figs.append( dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend))
def test_colormap(self): self.figs.append( dcs.plot_bar_breakdown(self.time, self.data, label=self.label, colormap=self.colormap))
def test_defaults(self): self.figs.append( dcs.plot_bar_breakdown(self.time, self.data, label=self.label))
def test_opts(self): self.figs.append( dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts))
def test_bad_legend(self): with self.assertRaises(AssertionError): dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend[:-1])
def test_nominal(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts, \ legend=self.legend, colormap=self.colormap))
def test_ignore_zeros(self): self.data[:, 1] = 0 self.data[:, 3] = np.nan self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, ignore_empties=True))
def test_null_data(self): with dcs.capture_output() as out: dcs.plot_bar_breakdown(self.time, None, '') output = out.getvalue().strip() out.close() self.assertEqual(output, 'plot skipped due to missing data.')
def test_colormap(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, colormap=self.colormap))
def test_legend(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend))
def test_opts(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts))
def test_defaults(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label))
def test_nominal(self): self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts, \ legend=self.legend, colormap=self.colormap))