def test_dataframe_pane_streamz(document, comm): from streamz.dataframe import Random sdf = Random(interval='200ms', freq='50ms') pane = DataFrame(sdf) assert pane._stream is None # Create pane model = pane.get_root(document, comm=comm) assert pane._stream is not None assert pane._models[model.ref['id']][0] is model assert model.text == '' # Replace Pane.object pane.object = sdf.x assert pane._models[model.ref['id']][0] is model assert model.text == '' # Cleanup pane._cleanup(model) assert pane._stream is None assert pane._models == {}
def test_get_streamz_seriess_pane_type(): from streamz.dataframe import Random sdf = Random(interval='200ms', freq='50ms').groupby('y').sum() assert PaneBase.get_pane_type(sdf.x) is DataFrame
def test_get_streamz_dataframe_pane_type(): from streamz.dataframe import Random sdf = Random(interval='200ms', freq='50ms') assert PaneBase.get_pane_type(sdf) is DataFrame
def test_streamz_dataframes_patched(self): from streamz.dataframe import Random random_df = Random() self.assertIsInstance( random_df.groupby('x').sum().hvplot, hvPlotTabular)
def test_streamz_series_patched(self): from streamz.dataframe import Random random_df = Random() self.assertIsInstance(random_df.x.hvplot, hvPlotTabular)
def test_streamz_series_patched(self): from streamz.dataframe import Random random_df = Random() self.assertIsInstance(random_df.x.holoplot, HoloPlot)