Merge lp:~canonical-platform-qa/ubuntu-keyboard/fix_base_class into lp:ubuntu-keyboard

Proposed by Leo Arias
Status: Merged
Approved by: Michael Sheldon
Approved revision: 360
Merged at revision: 365
Proposed branch: lp:~canonical-platform-qa/ubuntu-keyboard/fix_base_class
Merge into: lp:ubuntu-keyboard
Diff against target: 129 lines (+15/-19)
4 files modified
tests/autopilot/ubuntu_keyboard/emulators/__init__.py (+1/-7)
tests/autopilot/ubuntu_keyboard/emulators/key.py (+5/-5)
tests/autopilot/ubuntu_keyboard/emulators/keyboard.py (+3/-3)
tests/autopilot/ubuntu_keyboard/emulators/keypad.py (+6/-4)
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-keyboard/fix_base_class
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+257644@code.launchpad.net

Commit message

Use the base class from the toolkit in autopilot tests.

Description of the change

Autopilot is currently designed to have a single proxy object base, so we started finding some problems when we integrated tests from multiple projects for the sanity suite. We are working on making autopilot smarter, but in order to be able to change the design without breaking any tests we need this change.
And in this case, it makes sense to use the proxy object from the toolkit, because the one defined for this project was empty.

Are there any related MPs required for this MP to build/function as expected? Please list.

No MPs required.

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

It is.

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

Just made sure that the tests are still passing.

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator?

Only changes to automated tests, so no need to run the test plan.

If you changed the UI, was the change specified/approved by design?

No UI changes.

If you changed UI labels, did you update the pot file?

No UI changes.

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

No packaging changes.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

I have a couple of questions, but mostly it looks good.

360. By Leo Arias

Reverted the whitespace changes. Will do them in a separate branch.

Revision history for this message
Leo Arias (elopio) wrote :

Thanks max. Pushed.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes (just ran tests locally, no changes to main app code)

Did CI run pass? If not, please explain why.

 * Unrelated flaky test

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/__init__.py'
2--- tests/autopilot/ubuntu_keyboard/emulators/__init__.py 2013-09-26 16:02:12 +0000
3+++ tests/autopilot/ubuntu_keyboard/emulators/__init__.py 2015-04-29 19:32:49 +0000
4@@ -1,7 +1,7 @@
5 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6 #
7 # Ubuntu Keyboard Test Suite
8-# Copyright (C) 2013 Canonical
9+# Copyright (C) 2013, 2015 Canonical
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13@@ -16,9 +16,3 @@
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17-
18-from autopilot.introspection import CustomEmulatorBase
19-
20-
21-class UbuntuKeyboardEmulatorBase(CustomEmulatorBase):
22- """A base class for all Ubuntu Keyboard emulators."""
23
24=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/key.py'
25--- tests/autopilot/ubuntu_keyboard/emulators/key.py 2013-10-10 09:06:50 +0000
26+++ tests/autopilot/ubuntu_keyboard/emulators/key.py 2015-04-29 19:32:49 +0000
27@@ -1,7 +1,7 @@
28 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
29 #
30 # Ubuntu Keyboard Test Suite
31-# Copyright (C) 2013 Canonical
32+# Copyright (C) 2013, 2015 Canonical
33 #
34 # This program is free software: you can redistribute it and/or modify
35 # it under the terms of the GNU General Public License as published by
36@@ -17,15 +17,15 @@
37 # along with this program. If not, see <http://www.gnu.org/licenses/>.
38 #
39
40-from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
41-
42+import logging
43 from collections import namedtuple
44-import logging
45+
46+import ubuntuuitoolkit
47
48 logger = logging.getLogger(__name__)
49
50
51-class Key(UbuntuKeyboardEmulatorBase):
52+class Key(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
53 """An emulator that encapsulates details of a keyboard key (i.e. extended
54 characters).
55
56
57=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/keyboard.py'
58--- tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-03-12 17:34:47 +0000
59+++ tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-04-29 19:32:49 +0000
60@@ -1,7 +1,7 @@
61 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
62 #
63 # Ubuntu Keyboard Test Suite
64-# Copyright (C) 2013 Canonical
65+# Copyright (C) 2013, 2015 Canonical
66 #
67 # This program is free software: you can redistribute it and/or modify
68 # it under the terms of the GNU General Public License as published by
69@@ -19,13 +19,13 @@
70
71 from collections import defaultdict
72
73-from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
74 from ubuntu_keyboard.emulators.keypad import KeyPad
75
76 from time import sleep
77 import logging
78 import os
79
80+import ubuntuuitoolkit as toolkit
81 from autopilot.input import Pointer, Touch
82 from autopilot.introspection import (
83 get_proxy_object_for_existing_process,
84@@ -114,7 +114,7 @@
85 try:
86 Keyboard.__maliit = get_proxy_object_for_existing_process(
87 connection_name='org.maliit.server',
88- emulator_base=UbuntuKeyboardEmulatorBase
89+ emulator_base=toolkit.UbuntuUIToolkitCustomProxyObjectBase
90 )
91
92 if Keyboard.__maliit is None:
93
94=== modified file 'tests/autopilot/ubuntu_keyboard/emulators/keypad.py'
95--- tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-03-09 13:07:56 +0000
96+++ tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-04-29 19:32:49 +0000
97@@ -1,7 +1,7 @@
98 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
99 #
100 # Ubuntu Keyboard Test Suite
101-# Copyright (C) 2013 Canonical
102+# Copyright (C) 2013, 2015 Canonical
103 #
104 # This program is free software: you can redistribute it and/or modify
105 # it under the terms of the GNU General Public License as published by
106@@ -17,10 +17,12 @@
107 # along with this program. If not, see <http://www.gnu.org/licenses/>.
108 #
109
110-from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
111+import logging
112+
113+import ubuntuuitoolkit
114+
115 from ubuntu_keyboard.emulators.key import Key
116
117-import logging
118
119 logger = logging.getLogger(__name__)
120
121@@ -31,7 +33,7 @@
122 CAPSLOCK = "CAPSLOCK"
123
124
125-class KeyPad(UbuntuKeyboardEmulatorBase):
126+class KeyPad(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
127 """A basic emulator that provides the details of the keys contained within.
128
129 """

Subscribers

People subscribed via source and target branches