Merge lp:~brendan-donegan/checkbox/bug1177647 into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 2174
Merged at revision: 2178
Proposed branch: lp:~brendan-donegan/checkbox/bug1177647
Merge into: lp:checkbox
Diff against target: 25 lines (+3/-1)
2 files modified
checkbox-old/checkbox_qt/qt_interface.py (+1/-1)
checkbox-old/debian/changelog (+2/-0)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1177647
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+168915@code.launchpad.net

Description of the change

For some reason the show_tree function in qt_interface.py did not sort the dictionary of items to be displayed in the test selection tree, so the order would be random as expected from a Python dictionary.

Simply sorting the list of items causes the tests to be shown in order at the test selection view. Note that this will always be alphabetical order, and has nothing to do with the order of the tests in the whitelist.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good. I'll give it some testing and land it. Thanks

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-old/checkbox_qt/qt_interface.py'
2--- checkbox-old/checkbox_qt/qt_interface.py 2013-06-03 15:00:37 +0000
3+++ checkbox-old/checkbox_qt/qt_interface.py 2013-06-12 10:54:29 +0000
4@@ -147,7 +147,7 @@
5
6 def buildBranch(options, default, baseIndex="1"):
7 internalIndex = 1
8- for test, state in options.items():
9+ for test, state in sorted(options.items()):
10 active = test in default
11 if isinstance(state, dict):
12 indexedOptions[
13
14=== modified file 'checkbox-old/debian/changelog'
15--- checkbox-old/debian/changelog 2013-06-11 16:26:40 +0000
16+++ checkbox-old/debian/changelog 2013-06-12 10:54:29 +0000
17@@ -23,6 +23,8 @@
18 * jobs/touchpad.txt.in - Remove the requires line for touch_mode in
19 touchpad/horizontal and touchpad/vertical so that those tests will
20 at least run on those systems where they are supposed to (LP: #1184882)
21+ * checkbox_qt/qt_interface.py - Order the list of items to be displayed
22+ alphabetically, so the order is consistent (LP: #1177647)
23
24 [ Daniel Manrique ]
25 * jobs/stress.txt.in: fixed a few inconsistent invocations of sleep_test.

Subscribers

People subscribed via source and target branches