Skip to content
This repository
Browse code

Update pyface/tasks/tests/test_dock_pane_toggle_group.py

Improve test comments.
  • Loading branch information...
commit 4dcf24222a194e980bbffdbd11954e97239fa5be 1 parent 5941b70
Pietro Berkes authored November 16, 2012
8  pyface/tasks/tests/test_dock_pane_toggle_group.py
@@ -20,8 +20,8 @@ def create_central_pane(self):
20 20
 
21 21
     def create_dock_panes(self):
22 22
         self.dock_panes = dock_panes = [
23  
-            DockPane(id='tests.bogus_task.dock_pane_1', name='Dock Pane 2'),
24  
-            DockPane(id='tests.bogus_task.dock_pane_2', name='Dock Pane 1'),
  23
+            DockPane(id='tests.bogus_task.dock_pane_2', name='Dock Pane 2'),
  24
+            DockPane(id='tests.bogus_task.dock_pane_1', name='Dock Pane 1'),
25 25
         ]
26 26
 
27 27
         return dock_panes
@@ -75,6 +75,7 @@ def test_group_content_at_startup(self):
75 75
         # Check that there are 2 dock panes in the group at the beginning.
76 76
         self.assertEqual(2, len(self.dock_pane_toggle_group.items))
77 77
 
  78
+        # Names are sorted by the group.
78 79
         names = self.get_dock_pane_toggle_action_names()
79 80
         expected_names = ['Dock Pane 1', 'Dock Pane 2']
80 81
         self.assertItemsEqual(expected_names, names)
@@ -88,6 +89,7 @@ def test_react_to_dock_pane_added(self):
88 89
         # Check that there are 3 dock panes in the group.
89 90
         self.assertEqual(3, len(self.dock_pane_toggle_group.items))
90 91
 
  92
+        # Names are sorted by the group.
91 93
         names = self.get_dock_pane_toggle_action_names()
92 94
         expected_names = ['Dock Pane 0', 'Dock Pane 1', 'Dock Pane 2']
93 95
         self.assertItemsEqual(expected_names, names)
@@ -96,7 +98,7 @@ def test_react_to_dock_pane_removed(self):
96 98
         # Remove a dock pane from the task.
97 99
         self.task_state.dock_panes.remove(self.task.dock_panes[0])
98 100
 
99  
-        # Check that there are 3 dock panes in the group.
  101
+        # Check that there is only 1 dock pane left in the group.
100 102
         self.assertEqual(1, len(self.dock_pane_toggle_group.items))
101 103
 
102 104
         names = self.get_dock_pane_toggle_action_names()

0 notes on commit 4dcf242

Please sign in to comment.
Something went wrong with that request. Please try again.