Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
fixed unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Jan 18, 2011
1 parent 17fac27 commit 5243876
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/etk/docking/__init__.py
Expand Up @@ -62,6 +62,8 @@ def _(message): return message
# This also defines the widgets that can be considered public.
############################################################################
from .docklayout import DockLayout
from .docklayout import add_new_group_left, add_new_group_right, \
add_new_group_above, add_new_group_below, add_new_group_floating
from .dockframe import DockFrame
from .dockpaned import DockPaned
from .dockgroup import DockGroup
Expand Down
3 changes: 1 addition & 2 deletions lib/etk/docking/docklayout.py
Expand Up @@ -317,8 +317,7 @@ def on_dockgroup_item_selected(self, group, item):
if focus_child:
# item-selected is emited by is-focus handler
focus_child.set_property('has-focus', True)
else: #if item is not self._focused_item:
self.emit('item-selected', group, item)
self.emit('item-selected', group, item)

################################################################################
# Placement
Expand Down
8 changes: 4 additions & 4 deletions lib/etk/docking/tests/test_dockgroup.py
Expand Up @@ -377,13 +377,13 @@ def test_item_closed_event_is_emited_on_close(self):
tab = dockgroup._tabs[0]

item_closed = []
def item_closed_handler(group, item):
item_closed.append((group, item))
def item_closed_handler(item):
item_closed.append(item)

dockgroup.connect('item-closed', item_closed_handler)
dockitem.connect('close', item_closed_handler)

# Simulate clicking the close button
tab.button.emit('clicked')

assert [(dockgroup, dockitem)] == item_closed
assert [dockitem] == item_closed

0 comments on commit 5243876

Please sign in to comment.