Beispiel #1
0
    def test_vis2widget_input_figure(self):
        data = np.random.rand(160, 3)

        fig = plt.figure(figsize=(10, 5))
        plt.plot(data)

        assert isinstance(vis2widget(fig), widgets.Widget)
Beispiel #2
0
    def test_vis2widget_input_widget(self):
        wg = widgets.IntSlider(
            value=7,
            min=0,
            max=10,
            step=1,
            description='Test:',
            disabled=False,
            continuous_update=False,
            orientation='horizontal',
            readout=True,
            readout_format='d')

        assert isinstance(vis2widget(wg), widgets.Widget)
Beispiel #3
0
 def test_vis2widget_input_other(self):
     data = np.random.rand(160, 3)
     with pytest.raises(ValueError, match="unsupported vis type"):
         vis2widget(data)