Merge lp:~veebers/autopilot/fix_cleanup_errors_1185790 into lp:autopilot

Proposed by Christopher Lee
Status: Merged
Approved by: Thomi Richards
Approved revision: 232
Merged at revision: 233
Proposed branch: lp:~veebers/autopilot/fix_cleanup_errors_1185790
Merge into: lp:autopilot
Diff against target: 64 lines (+7/-6)
4 files modified
autopilot/globals.py (+3/-0)
autopilot/input/_X11.py (+2/-2)
autopilot/input/_uinput.py (+2/-2)
autopilot/testcase.py (+0/-2)
To merge this branch: bzr merge lp:~veebers/autopilot/fix_cleanup_errors_1185790
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+166494@code.launchpad.net

Commit message

Fixes a couple of places where code wasn't updated with the recent cleanup/start/end test code execution changes.

Description of the change

Fixes a couple of places where code wasn't updated with the recent cleanup/start/end test code execution changes.

Ran all the Autopilot tests, ran a handful of Unity autopilot tests too.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/globals.py'
2--- autopilot/globals.py 2013-05-30 05:26:34 +0000
3+++ autopilot/globals.py 2013-05-30 12:05:57 +0000
4@@ -94,6 +94,9 @@
5 _recording_app = '/usr/bin/recordmydesktop'
6 _recording_opts = ['--no-sound', '--no-frame', '-o',]
7
8+ def __init__(self):
9+ self._enable_recording = False
10+
11 def __call__(self, test_instance):
12 if not self._have_recording_app():
13 logger.warning("Disabling video capture since '%s' is not present", self._recording_app)
14
15=== modified file 'autopilot/input/_X11.py'
16--- autopilot/input/_X11.py 2013-05-30 05:30:38 +0000
17+++ autopilot/input/_X11.py 2013-05-30 12:05:57 +0000
18@@ -418,8 +418,8 @@
19 self.move(x2, y2)
20 self.release()
21
22- @staticmethod
23- def cleanup():
24+ @classmethod
25+ def on_test_end():
26 """Put mouse in a known safe state."""
27 global _PRESSED_MOUSE_BUTTONS
28 for btn in _PRESSED_MOUSE_BUTTONS:
29
30=== modified file 'autopilot/input/_uinput.py'
31--- autopilot/input/_uinput.py 2013-05-21 05:01:51 +0000
32+++ autopilot/input/_uinput.py 2013-05-30 12:05:57 +0000
33@@ -130,8 +130,8 @@
34 self.press(key, delay)
35 self.release(key, delay)
36
37- @staticmethod
38- def cleanup():
39+ @classmethod
40+ def on_test_end():
41 """Generate KeyRelease events for any un-released keys.
42
43 Make sure you call this at the end of any test to release
44
45=== modified file 'autopilot/testcase.py'
46--- autopilot/testcase.py 2013-05-29 05:39:45 +0000
47+++ autopilot/testcase.py 2013-05-30 12:05:57 +0000
48@@ -155,14 +155,12 @@
49 def keyboard(self):
50 if self._kb is None:
51 self._kb = Keyboard.create()
52- self.addCleanup(self._kb.cleanup)
53 return self._kb
54
55 @property
56 def mouse(self):
57 if self._mouse is None:
58 self._mouse = Mouse.create()
59- self.addCleanup(self._mouse.cleanup)
60 return self._mouse
61
62 @property
63
64=== modified file 'debian/rules' (properties changed: -x to +x)

Subscribers

People subscribed via source and target branches