Beispiel #1
0
 def test_valid_style(self):
     """Test valid styling options."""
     for sty in [{"c": "k"}]:
         ax = spider(self.arr, **sty)
         self.assertTrue(isinstance(ax, matplotlib.axes.Axes))
Beispiel #2
0
 def test_invalid_style_options(self):
     """Test stability under invalid style values."""
     style = {"color": "notacolor", "marker": "red"}
     for arr in [self.arr]:
         ax = spider(arr, **style)
Beispiel #3
0
 def test_mode_ckde(self):
     for mode in ["ckde"]:
         with self.subTest(mode=mode):
             ax = spider(self.arr, mode=mode)
Beispiel #4
0
 def test_invalid_mode_raises_notimplemented(self):
     with self.assertRaises(NotImplementedError):
         for arr in [self.arr]:
             ax = spider(arr, mode="notamode")
Beispiel #5
0
 def test_modes(self):
     """Test all mode functionality is available."""
     for mode in ["plot", "fill", "binkde", "kde", "hist"]:
         with self.subTest(mode=mode):
             ax = spider(self.arr, mode=mode)
Beispiel #6
0
 def test_axis_specified(self):
     """Test generation of plot with axis specified."""
     ax = spider(self.arr, ax=self.ax)
     self.assertTrue(isinstance(ax, matplotlib.axes.Axes))
Beispiel #7
0
 def test_multiple(self):
     """Test generation of plot with multiple records."""
     ax = spider(self.arr)
     self.assertTrue(isinstance(ax, matplotlib.axes.Axes))
Beispiel #8
0
 def test_one(self):
     """Test generation of plot with one record."""
     ax = spider(self.arr[0, :])
     self.assertTrue(isinstance(ax, matplotlib.axes.Axes))
Beispiel #9
0
 def test_none(self):
     """Test generation of plot with no data."""
     ax = spider(np.empty(0))
     self.assertTrue(isinstance(ax, matplotlib.axes.Axes))