Ejemplo n.º 1
0
 def test_plot_box_data_empty(self):
     """_plot_box_data() should not error when given empty list of data,
     but should not plot anything."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     # the original test was poor as it was testing a property of matplotlib
     # I'm simply exercising this here. These capabilities will be dropped
     # in a future version.
     for key in ['boxes', 'medians', 'whiskers', 'fliers', 'caps']:
         val = result[key]
Ejemplo n.º 2
0
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
             1.5, 'stdv')
     self.assertEqual(type(result), dict)
     # make sure the values are not empty
     for key in ['boxes', 'medians', 'whiskers', 'fliers', 'caps']:
         val = result[key]
         self.assertTrue(len(val), 0)
Ejemplo n.º 3
0
 def test_plot_box_data_empty(self):
     """_plot_box_data() should not error when given empty list of data,
     but should not plot anything."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     # the original test was poor as it was testing a property of matplotlib
     # I'm simply exercising this here. These capabilities will be dropped
     # in a future version.
     for key in ['boxes', 'medians', 'whiskers', 'fliers', 'caps']:
         val = result[key]
Ejemplo n.º 4
0
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
                             1.5, 'stdv')
     self.assertEqual(type(result), dict)
     # make sure the values are not empty
     for key in ['boxes', 'medians', 'whiskers', 'fliers', 'caps']:
         val = result[key]
         self.assertTrue(len(val), 0)
 def test_plot_box_data_empty(self):
     """_plot_box_data() should not error when given empty list of data,
     but should not plot anything."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 0)
     self.assertEqual(len(result['medians']), 0)
     self.assertEqual(len(result['whiskers']), 0)
     self.assertEqual(len(result['fliers']), 0)
     self.assertEqual(len(result['caps']), 0)
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
                             1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 1)
     self.assertEqual(len(result['medians']), 1)
     self.assertEqual(len(result['whiskers']), 2)
     self.assertEqual(len(result['fliers']), 2)
     self.assertEqual(len(result['caps']), 2)
 def test_plot_box_data_empty(self):
     """_plot_box_data() should not error when given empty list of data,
     but should not plot anything."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 0)
     self.assertEqual(len(result['medians']), 0)
     self.assertEqual(len(result['whiskers']), 0)
     self.assertEqual(len(result['fliers']), 0)
     self.assertEqual(len(result['caps']), 0)
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = _create_plot()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
             1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 1)
     self.assertEqual(len(result['medians']), 1)
     self.assertEqual(len(result['whiskers']), 2)
     self.assertEqual(len(result['fliers']), 2)
     self.assertEqual(len(result['caps']), 2)