Merge lp:~thomir/unity/autopilot-attribute-feature into lp:unity
| Status: | Merged |
|---|---|
| Approved by: | Thomi Richards on 2012-04-17 |
| Approved revision: | 2229 |
| Merged at revision: | 2287 |
| Proposed branch: | lp:~thomir/unity/autopilot-attribute-feature |
| Merge into: | lp:unity |
| Diff against target: |
257 lines (+77/-42) 5 files modified
tests/autopilot/autopilot/emulators/unity/__init__.py (+54/-3) tests/autopilot/autopilot/emulators/unity/dash.py (+10/-28) tests/autopilot/autopilot/emulators/unity/hud.py (+4/-0) tests/autopilot/autopilot/tests/__init__.py (+3/-3) tests/autopilot/autopilot/tests/test_dash.py (+6/-8) |
| To merge this branch: | bzr merge lp:~thomir/unity/autopilot-attribute-feature |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Marco Trevisan (Treviño) | Approve on 2012-04-13 | ||
| Brandon Schaefer (community) | 2012-04-12 | Approve on 2012-04-12 | |
|
Review via email:
|
|||
Commit Message
Added the autopilot wait_for attribute feature.
Description of the Change
Problem:
We often write code in autopilkot emulators that looks something like this:
for i in range(11):
if self.some_attribute != expected_value:
sleep(1)
raise RuntimeError(
...since duplicated code is bad, we'd like instead to be able to write this like so:
self.some_
... while still using 'self.some_
Solution:
This branch does exactly that. It also converts the dash and hud emulators to use this new feature.
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Ah, just one thing: what about to increase the number of the checks and reducing the sleep time (reducing the sleep time to .25 or .5...)?
AP is already quite slow as it is now.
| Thomi Richards (thomir) wrote : | # |
> Ah, just one thing: what about to increase the number of the checks and
> reducing the sleep time (reducing the sleep time to .25 or .5...)?
> AP is already quite slow as it is now.
Hi Marco,
I'm happy to experiment with the timings, but right now I'd rather not hot the dbus interface too hard. Perhaps in the Q cycle we can look at making this more responsive.
| Unity Merger (unity-merger) wrote : | # |
No commit message specified.
| Unity Merger (unity-merger) wrote : | # |
No commit message specified.


Nice clean up!