Skip to content

Commit

Permalink
Merge pull request #276 from ContinuumIO/gui_fix
Browse files Browse the repository at this point in the history
Fix GUI
  • Loading branch information
martindurant committed Feb 21, 2019
2 parents 54b2683 + 614daaa commit 4efd882
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
Empty file added intake/gui/tests/__init__.py
Empty file.
19 changes: 19 additions & 0 deletions intake/gui/tests/test_gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#-----------------------------------------------------------------------------

import os
import pytest
here = os.path.abspath(os.path.dirname(__file__))


def test_add_cat():
pytest.importorskip('ipywidgets')
import intake
intake.gui.add_cat(os.path.join(here, '..', '..', 'catalog', 'tests',
'catalog1.yml'))
assert 'catalog1' in intake.gui.cat_list.value
assert 'entry1' in intake.gui.item_list.options
4 changes: 2 additions & 2 deletions intake/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def add_cat(self, ev=None):
return
self.cats[cat.name] = cat
self.update_cat_list()
self.cat_list.value = cat._name
self.cat_selected({'new': cat._name})
self.cat_list.value = cat.name
self.cat_selected({'new': cat.name})

def del_cat(self, ev):
if self.cat_list.value:
Expand Down
2 changes: 2 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
intake-parquet
zarr
notebook
ipywidgets

0 comments on commit 4efd882

Please sign in to comment.