Skip to content

Commit

Permalink
Update pyface/tasks/tests/test_dock_pane_toggle_group.py
Browse files Browse the repository at this point in the history
Improve test comments.
  • Loading branch information
Pietro Berkes committed Nov 16, 2012
1 parent 5941b70 commit 4dcf242
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pyface/tasks/tests/test_dock_pane_toggle_group.py
Expand Up @@ -20,8 +20,8 @@ def create_central_pane(self):

def create_dock_panes(self):
self.dock_panes = dock_panes = [
DockPane(id='tests.bogus_task.dock_pane_1', name='Dock Pane 2'),
DockPane(id='tests.bogus_task.dock_pane_2', name='Dock Pane 1'),
DockPane(id='tests.bogus_task.dock_pane_2', name='Dock Pane 2'),
DockPane(id='tests.bogus_task.dock_pane_1', name='Dock Pane 1'),
]

return dock_panes
Expand Down Expand Up @@ -75,6 +75,7 @@ def test_group_content_at_startup(self):
# Check that there are 2 dock panes in the group at the beginning.
self.assertEqual(2, len(self.dock_pane_toggle_group.items))

# Names are sorted by the group.
names = self.get_dock_pane_toggle_action_names()
expected_names = ['Dock Pane 1', 'Dock Pane 2']
self.assertItemsEqual(expected_names, names)
Expand All @@ -88,6 +89,7 @@ def test_react_to_dock_pane_added(self):
# Check that there are 3 dock panes in the group.
self.assertEqual(3, len(self.dock_pane_toggle_group.items))

# Names are sorted by the group.
names = self.get_dock_pane_toggle_action_names()
expected_names = ['Dock Pane 0', 'Dock Pane 1', 'Dock Pane 2']
self.assertItemsEqual(expected_names, names)
Expand All @@ -96,7 +98,7 @@ def test_react_to_dock_pane_removed(self):
# Remove a dock pane from the task.
self.task_state.dock_panes.remove(self.task.dock_panes[0])

# Check that there are 3 dock panes in the group.
# Check that there is only 1 dock pane left in the group.
self.assertEqual(1, len(self.dock_pane_toggle_group.items))

names = self.get_dock_pane_toggle_action_names()
Expand Down

0 comments on commit 4dcf242

Please sign in to comment.