MCPcopy Create free account
hub / github.com/holoviz/hvplot / test_interactive_slice

Function test_interactive_slice

hvplot/tests/testinteractive.py:205–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203
204
205def test_interactive_slice():
206 df = makeDataFrame()
207 w = pn.widgets.IntSlider(start=10, end=40)
208
209 idf = Interactive(df)
210 pipeline = idf.iloc[:w]
211 ioutput = pipeline.panel().object().object
212 iw = pipeline.widgets()
213
214 output = df.iloc[:10]
215
216 pd.testing.assert_frame_equal(ioutput, output)
217 assert len(iw) == 1
218 assert iw[0] == w
219
220 w.value = 15
221 ioutput = pipeline.panel().object().object
222 output = df.iloc[:15]
223 pd.testing.assert_frame_equal(ioutput, output)
224
225
226def test_interactive_pandas_dataframe_hvplot_accessor(df):

Callers

nothing calls this directly

Calls 4

makeDataFrameFunction · 0.90
InteractiveClass · 0.90
panelMethod · 0.80
widgetsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…