diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-30 21:23:57 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-30 21:23:57 (GMT) |
commit | 744cb11f2d3426a97ff40377b233b88428ab6611 (patch) | |
tree | 93e75e57c4e06f252a34f32783b0b7426dcdbe60 /tests/shell.py | |
parent | 65bebf31e9a530615948598607f9679855da0855 (diff) |
Sort activities by name
Diffstat (limited to 'tests/shell.py')
-rw-r--r-- | tests/shell.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/shell.py b/tests/shell.py index 1b94044..9edc0c8 100644 --- a/tests/shell.py +++ b/tests/shell.py @@ -1,3 +1,5 @@ +from operator import attrgetter + from dogtail import tree from dogtail import predicate @@ -24,6 +26,8 @@ cells = table.findChildren(predicate.GenericPredicate(roleName="table cell")) for row in [cells[i:i+5] for i in range(0, len(cells), 5)]: activities.append(Activity(name=row[2].text, icon=row[1])) +activities.sort(key=attrgetter("name")) + # Launch and close all the activities for activity in activities: print "Launching %s" % activity.name |