def test_widget_client_clear(self): data = {"a": np.arange(0, 50)} widget = PerspectiveWidget(data, client=True) mocked_post = partial(mock_post, assert_msg={"cmd": "clear"}) widget.post = MethodType(mocked_post, widget) widget.clear() assert widget._data is None
def test_widget_clear_server(self): data = {"a": np.arange(0, 50)} widget = PerspectiveWidget(data, server=True) widget.clear() assert widget.table.size() == 0