def test_sort_stacked_only_stack(self): seriesList = self._generate_series_list() seriesList[0].options = 'stacked' seriesList[1].options = 'stacked' seriesList[2].options = 'stacked' self.assertEqual(glyph.sort_stacked(copy.deepcopy(seriesList)), seriesList)
def test_sort_stacked_invalid_inputs(self): with self.assertRaises(TypeError): glyph.sort_stacked(None) with self.assertRaises(TypeError): glyph.sort_stacked(1) with self.assertRaises(AttributeError): glyph.sort_stacked('string')
def test_sort_stacked_no_stack(self): seriesList = self._generate_series_list() self.assertEqual(glyph.sort_stacked(seriesList), seriesList)
def test_sort_stacked_empty_input(self): self.assertEqual(glyph.sort_stacked(''), [])