コード例 #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)
コード例 #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')
コード例 #3
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')
コード例 #4
0
 def test_sort_stacked_no_stack(self):
     seriesList = self._generate_series_list()
     self.assertEqual(glyph.sort_stacked(seriesList), seriesList)
コード例 #5
0
 def test_sort_stacked_empty_input(self):
     self.assertEqual(glyph.sort_stacked(''), [])
コード例 #6
0
 def test_sort_stacked_stack_and_no_stack(self):
     seriesList = self._generate_series_list()
     seriesList[0].options='stacked'
     seriesList[2].options='stacked'
     self.assertEqual(glyph.sort_stacked(copy.deepcopy(seriesList)), [seriesList[0],seriesList[2],seriesList[1]])
コード例 #7
0
 def test_sort_stacked_no_stack(self):
     seriesList = self._generate_series_list()
     self.assertEqual(glyph.sort_stacked(seriesList), seriesList)
コード例 #8
0
 def test_sort_stacked_empty_input(self):
     self.assertEqual(glyph.sort_stacked(''), [])
コード例 #9
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)