Esempio n. 1
0
 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)
Esempio n. 2
0
    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')
Esempio n. 3
0
 def test_sort_stacked_no_stack(self):
     seriesList = self._generate_series_list()
     self.assertEqual(glyph.sort_stacked(seriesList), seriesList)
Esempio n. 4
0
 def test_sort_stacked_empty_input(self):
     self.assertEqual(glyph.sort_stacked(''), [])