Merge lp:~azzar1/unity/lp-1226116 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3507
Proposed branch: lp:~azzar1/unity/lp-1226116
Merge into: lp:unity
Diff against target: 15 lines (+3/-2)
1 file modified
tests/autopilot/unity/tests/test_hud.py (+3/-2)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1226116
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+185854@code.launchpad.net

Commit message

Fix randomly failing AP test.

Description of the change

== Problem ==
unity.tests.test_hud.HudBehaviorTests.test_keyboard_steals_focus_from_mouse fails randomly.

== Fix ==
Specify a slower rate so that HUD can register the mouse movement properly

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/unity/tests/test_hud.py'
2--- tests/autopilot/unity/tests/test_hud.py 2013-05-21 18:04:08 +0000
3+++ tests/autopilot/unity/tests/test_hud.py 2013-09-16 16:31:30 +0000
4@@ -414,8 +414,9 @@
5 self.assertThat(self.unity.hud.num_buttons, Eventually(Equals(5)))
6 (x,y,w,h) = self.unity.hud.view.geometry
7
8- self.mouse.move(w/2, 0)
9- self.mouse.move(w/2, h)
10+ # Specify a slower rate so that HUD can register the mouse movement properly
11+ self.mouse.move(w/2, 0, rate=5)
12+ self.mouse.move(w/2, h, rate=5)
13 self.assertThat(self.unity.hud.view.selected_button, Eventually(Equals(5)))
14
15 for i in range(5):