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

Function test_interactive_xarray_function

hvplot/tests/testinteractive.py:168–186  ·  view source on GitHub ↗
(dataset)

Source from the content-addressed store, hash-verified

166
167
168def test_interactive_xarray_function(dataset):
169 ds = dataset.copy()
170 ds['air2'] = ds.air * 2
171
172 select = pn.widgets.Select(options=list(ds))
173
174 def sel_col(sel):
175 return ds[sel]
176
177 dsi = Interactive(bind(sel_col, select))
178
179 assert type(dsi) is XArrayInteractive
180 assert isinstance(dsi._fn, pn.param.ParamFunction)
181 assert dsi._transform == dim('air')
182 assert dsi._method is None
183
184 select.value = 'air2'
185 assert (dsi._obj == ds.air2).all()
186 assert dsi._transform == dim('air2')
187
188
189def test_interactive_nested_widgets():

Callers

nothing calls this directly

Calls 2

InteractiveClass · 0.90
bindFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…