(df)
| 149 | |
| 150 | |
| 151 | def test_interactive_pandas_function(df): |
| 152 | select = pn.widgets.Select(options=list(df.columns)) |
| 153 | |
| 154 | def sel_col(col): |
| 155 | return df[col] |
| 156 | |
| 157 | dfi = Interactive(bind(sel_col, select)) |
| 158 | assert type(dfi) is Interactive |
| 159 | pd.testing.assert_series_equal(dfi._obj, df.A) |
| 160 | assert isinstance(dfi._fn, pn.param.ParamFunction) |
| 161 | assert dfi._transform == dim('*') |
| 162 | assert dfi._method is None |
| 163 | |
| 164 | select.value = 'B' |
| 165 | pd.testing.assert_series_equal(dfi._obj, df.B) |
| 166 | |
| 167 | |
| 168 | def test_interactive_xarray_function(dataset): |
nothing calls this directly
no test coverage detected
searching dependent graphs…