Merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1429163-nopy2 into lp:ubuntu-ui-toolkit/staging

Proposed by Leo Arias
Status: Merged
Approved by: Cris Dywan
Approved revision: 1476
Merged at revision: 1485
Proposed branch: lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1429163-nopy2
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 1057 lines (+87/-154)
42 files modified
debian/control (+0/-9)
debian/ubuntu-ui-toolkit-autopilot.install (+0/-1)
push_to_phone.sh (+0/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+0/-3)
tests/autopilot/ubuntuuitoolkit/base.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+10/-10)
tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/components/test_header.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py (+1/-4)
tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/components/test_units.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py (+1/-4)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+4/-4)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py (+3/-6)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_pull_to_refresh.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+4/-7)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textarea.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py (+2/-5)
tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py (+3/-3)
tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py (+4/-9)
tests/autopilot/ubuntuuitoolkit/tests/test_launcher.py (+1/-7)
tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py (+2/-5)
tests/tests.pro (+1/-4)
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1429163-nopy2
Reviewer Review Type Date Requested Status
Cris Dywan Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+256220@code.launchpad.net

This proposal supersedes a proposal from 2015-04-14.

Commit message

Removed python2 support from autopilot tests and helpers.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1476. By Leo Arias

Remove py2 from the makefiles.

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

Looks sensible. Nice clean-up!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-04-08 16:51:49 +0000
3+++ debian/control 2015-04-14 23:11:38 +0000
4@@ -7,7 +7,6 @@
5 libgles2-mesa-dev,
6 libglib2.0-dev,
7 python3:any,
8- python:any,
9 qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,
10 qtbase5-dev,
11 qtbase5-private-dev,
12@@ -44,7 +43,6 @@
13 locales,
14 suru-icon-theme,
15 uuid-runtime,
16- python-autopilot (>= 1.4),
17 python3-sphinx,
18 Standards-Version: 3.9.4
19 Homepage: https://launchpad.net/ubuntu-ui-toolkit
20@@ -141,13 +139,6 @@
21 dpkg-dev,
22 libqt5test5,
23 libqt5widgets5,
24- python-autopilot (>= 1.4),
25- python-fixtures,
26- python-gi,
27- python-mock,
28- python-testscenarios,
29- python-testtools,
30- python-autopilot-trace,
31 python3-fixtures,
32 python3-gi,
33 python3-testscenarios,
34
35=== modified file 'debian/ubuntu-ui-toolkit-autopilot.install'
36--- debian/ubuntu-ui-toolkit-autopilot.install 2014-06-17 07:12:49 +0000
37+++ debian/ubuntu-ui-toolkit-autopilot.install 2015-04-14 23:11:38 +0000
38@@ -1,3 +1,2 @@
39 usr/lib/python3
40 usr/lib/*/ubuntu-ui-toolkit/launcher
41-usr/lib/python2.7
42
43=== modified file 'push_to_phone.sh'
44--- push_to_phone.sh 2015-02-24 15:50:34 +0000
45+++ push_to_phone.sh 2015-04-14 23:11:38 +0000
46@@ -84,7 +84,6 @@
47
48 # Autopilot tests should always match the Toolkit
49 adb push tests/autopilot/ubuntuuitoolkit/ $STONE/ap || exit 1
50-echo cp -R ap/* /usr/lib/python2.7/dist-packages/ubuntuuitoolkit >> $RUN/copy.sh || exit 1
51 echo cp -R ap/* /usr/lib/python3/dist-packages/ubuntuuitoolkit >> $RUN/copy.sh || exit 1
52 adb push examples/ubuntu-ui-toolkit-gallery/ $STONE/ex >> $RUN/copy.sh || exit 1
53 echo cp -R ex/* /usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery
54
55=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py'
56--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py 2014-07-16 19:19:03 +0000
57+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py 2015-04-14 23:11:38 +0000
58@@ -1,6 +1,6 @@
59 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
60 #
61-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
62+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
63 #
64 # This program is free software; you can redistribute it and/or modify
65 # it under the terms of the GNU Lesser General Public License as published by
66@@ -73,7 +73,7 @@
67
68 def __init__(self, *args):
69 check_autopilot_version()
70- super(UbuntuUIToolkitCustomProxyObjectBase, self).__init__(*args)
71+ super().__init__(*args)
72 self.pointing_device = get_pointing_device()
73
74 def is_flickable(self):
75
76=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py'
77--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2015-03-23 12:00:27 +0000
78+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py 2015-04-14 23:11:38 +0000
79@@ -268,4 +268,4 @@
80 'Header is an internal QML component of Ubuntu.Components and '
81 'its API may change or be removed at any moment. Please use '
82 'MainView and Page instead.')
83- super(Header, self).__init__(*args)
84+ super().__init__(*args)
85
86=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py'
87--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2015-02-11 23:37:40 +0000
88+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py 2015-04-14 23:11:38 +0000
89@@ -1,6 +1,6 @@
90 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
91 #
92-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
93+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
94 #
95 # This program is free software; you can redistribute it and/or modify
96 # it under the terms of the GNU Lesser General Public License as published by
97@@ -42,7 +42,7 @@
98
99 @classmethod
100 def validate_dbus_object(cls, path, state):
101- if super(MainView, cls).validate_dbus_object(path, state):
102+ if super().validate_dbus_object(path, state):
103 # This covers MainView 0.1/1.0/1.1 and possible components
104 # derived from MainView (e.g. "CustomMainView") that have
105 # their own CPO.
106
107=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py'
108--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py 2014-08-26 16:29:26 +0000
109+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py 2015-04-14 23:11:38 +0000
110@@ -34,7 +34,7 @@
111 """TextField Autopilot custom proxy object."""
112
113 def __init__(self, *args):
114- super(TextField, self).__init__(*args)
115+ super().__init__(*args)
116 self.keyboard = _common.get_keyboard()
117
118 @autopilot_logging.log_action(logger.info)
119
120=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py'
121--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2015-03-10 11:49:27 +0000
122+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py 2015-04-14 23:11:38 +0000
123@@ -113,9 +113,6 @@
124 class ComposerSheet(_common.UbuntuUIToolkitCustomProxyObjectBase):
125 """ComposerSheet Autopilot custom proxy object."""
126
127- def __init__(self, *args):
128- super(ComposerSheet, self).__init__(*args)
129-
130 @autopilot_logging.log_action(logger.info)
131 def confirm(self):
132 """Confirm the composer sheet."""
133
134=== modified file 'tests/autopilot/ubuntuuitoolkit/base.py'
135--- tests/autopilot/ubuntuuitoolkit/base.py 2014-12-01 11:03:48 +0000
136+++ tests/autopilot/ubuntuuitoolkit/base.py 2015-04-14 23:11:38 +0000
137@@ -1,6 +1,6 @@
138 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
139 #
140-# Copyright (C) 2013, 2014 Canonical Ltd.
141+# Copyright (C) 2013, 2014, 2015 Canonical Ltd.
142 #
143 # This program is free software; you can redistribute it and/or modify
144 # it under the terms of the GNU Lesser General Public License as published by
145@@ -75,7 +75,7 @@
146 """Autopilot test case for applications using the Ubuntu UI Toolkit."""
147
148 def setUp(self):
149- super(UbuntuUIToolkitAppTestCase, self).setUp()
150+ super().setUp()
151 self.input_device_class = self._get_input_device_class()
152
153 def _get_input_device_class(self):
154
155=== modified file 'tests/autopilot/ubuntuuitoolkit/fixture_setup.py'
156--- tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2015-03-03 13:20:06 +0000
157+++ tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2015-04-14 23:11:38 +0000
158@@ -1,6 +1,6 @@
159 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
160 #
161-# Copyright (C) 2014 Canonical Ltd.
162+# Copyright (C) 2014, 2015 Canonical Ltd.
163 #
164 # This program is free software; you can redistribute it and/or modify
165 # it under the terms of the GNU Lesser General Public License as published by
166@@ -57,7 +57,7 @@
167 def __init__(
168 self, qml_file_contents=DEFAULT_QML_FILE_CONTENTS,
169 desktop_file_dict=None):
170- super(FakeApplication, self).__init__()
171+ super().__init__()
172 self._qml_file_contents = qml_file_contents
173 if desktop_file_dict is None:
174 self._desktop_file_dict = copy.deepcopy(DEFAULT_DESKTOP_FILE_DICT)
175@@ -65,7 +65,7 @@
176 self._desktop_file_dict = copy.deepcopy(desktop_file_dict)
177
178 def setUp(self):
179- super(FakeApplication, self).setUp()
180+ super().setUp()
181 self.qml_file_path, self.desktop_file_path = (
182 self._create_test_application())
183
184@@ -116,7 +116,7 @@
185 """Set the value of initctl environment variables."""
186
187 def __init__(self, global_=False, **kwargs):
188- super(InitctlEnvironmentVariable, self).__init__()
189+ super().__init__()
190 # Added one level of indirection to be able to spy the calls to
191 # environment during tests.
192 self.environment = environment
193@@ -124,7 +124,7 @@
194 self.global_ = global_
195
196 def setUp(self):
197- super(InitctlEnvironmentVariable, self).setUp()
198+ super().setUp()
199 for variable, value in self.variables.items():
200 self._add_variable_cleanup(variable)
201 self.environment.set_initctl_env_var(
202@@ -154,11 +154,11 @@
203 should_copy_xauthority_file = True
204
205 def __init__(self, directory=None):
206- super(FakeHome, self).__init__()
207+ super().__init__()
208 self.directory = directory
209
210 def setUp(self):
211- super(FakeHome, self).setUp()
212+ super().setUp()
213 self.directory = self._make_directory_if_not_specified()
214 if self.should_copy_xauthority_file:
215 self._copy_xauthority_file(self.directory)
216@@ -202,7 +202,7 @@
217 _UNITYSHELL_LAUNCHER_HIDDEN_MODE = 1 # launcher hidden
218
219 def setUp(self):
220- super(HideUnity7Launcher, self).setUp()
221+ super().setUp()
222 self._hide_launcher()
223
224 def _hide_launcher(self):
225@@ -232,14 +232,14 @@
226 class SimulateDevice(fixtures.Fixture):
227
228 def __init__(self, app_width, app_height, grid_unit_px):
229- super(SimulateDevice, self).__init__()
230+ super().__init__()
231 self.app_width = app_width
232 self.app_height = app_height
233 self.grid_unit_px = grid_unit_px
234 self._screen = None
235
236 def setUp(self):
237- super(SimulateDevice, self).setUp()
238+ super().setUp()
239 if self._is_geometry_larger_than_display(
240 self.app_width, self.app_height):
241 scale_divisor = self._get_scale_divisor()
242
243=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/__init__.py'
244--- tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2015-03-03 13:20:06 +0000
245+++ tests/autopilot/ubuntuuitoolkit/tests/__init__.py 2015-04-14 23:11:38 +0000
246@@ -92,7 +92,7 @@
247 """)
248
249 def setUp(self):
250- super(UbuntuUIToolkitWithFakeAppRunningTestCase, self).setUp()
251+ super().setUp()
252 self.launch_application()
253
254 def launch_application(self):
255@@ -126,7 +126,7 @@
256 """Base test case for self tests that define the QML on an string."""
257
258 def setUp(self):
259- super(QMLStringAppTestCase, self).setUp()
260+ super().setUp()
261 self.assertThat(
262 self.main_view.visible, Eventually(Equals(True)))
263
264@@ -156,7 +156,7 @@
265 desktop_file_path = None
266
267 def setUp(self):
268- super(QMLFileAppTestCase, self).setUp()
269+ super().setUp()
270 self.pointing_device = Pointer(self.input_device_class.create())
271 self.launch_application()
272
273
274=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_header.py'
275--- tests/autopilot/ubuntuuitoolkit/tests/components/test_header.py 2015-02-03 11:54:53 +0000
276+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_header.py 2015-04-14 23:11:38 +0000
277@@ -40,7 +40,7 @@
278 ]
279
280 def setUp(self):
281- super(HeaderActionsOverflowTestCase, self).setUp()
282+ super().setUp()
283 self.header = self.main_view.get_header()
284
285 def test_click_header_overflow_action_must_close_popover(self):
286@@ -71,7 +71,7 @@
287 dir_path, 'test_header.HeaderContentsTestCase.qml')
288
289 def setUp(self):
290- super(HeaderContentsTestCase, self).setUp()
291+ super().setUp()
292 self.header = self.main_view.get_header()
293
294 def test_open_page_with_head_contents_must_change_header(self):
295
296=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py'
297--- tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py 2014-10-06 10:44:31 +0000
298+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py 2015-04-14 23:11:38 +0000
299@@ -1,6 +1,6 @@
300 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
301 #
302-# Copyright (C) 2014 Canonical Ltd.
303+# Copyright (C) 2014, 2015 Canonical Ltd.
304 #
305 # This program is free software; you can redistribute it and/or modify
306 # it under the terms of the GNU Lesser General Public License as published by
307@@ -28,9 +28,6 @@
308 test_qml_file_path = os.path.join(
309 dir_path, 'test_popover.qml')
310
311- def setUp(self):
312- super(DialogScrollTestCase, self).setUp()
313-
314 def test_dialog_small(self):
315 button = self.main_view.select_single(objectName='button_small')
316 self.pointing_device.click_object(button)
317
318=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py'
319--- tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py 2015-03-16 10:01:09 +0000
320+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py 2015-04-14 23:11:38 +0000
321@@ -1,6 +1,6 @@
322 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
323 #
324-# Copyright (C) 2014 Canonical Ltd.
325+# Copyright (C) 2014, 2015 Canonical Ltd.
326 #
327 # This program is free software; you can redistribute it and/or modify
328 # it under the terms of the GNU Lesser General Public License as published by
329@@ -59,7 +59,7 @@
330 return command_line
331
332 def setUp(self):
333- super(CaretTextInputTestCase, self).setUp()
334+ super().setUp()
335 self.textfield = self.main_view.select_single(
336 objectName=self.objectName)
337 self.assertFalse(self.textfield.focus)
338@@ -130,7 +130,7 @@
339 return command_line
340
341 def setUp(self):
342- super(InsertModeTextInputTestCase, self).setUp()
343+ super().setUp()
344 self.textfield = self.main_view.select_single(
345 objectName=self.objectName)
346 self.assertFalse(self.textfield.focus)
347
348=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/components/test_units.py'
349--- tests/autopilot/ubuntuuitoolkit/tests/components/test_units.py 2015-04-13 18:20:05 +0000
350+++ tests/autopilot/ubuntuuitoolkit/tests/components/test_units.py 2015-04-14 23:11:38 +0000
351@@ -54,7 +54,7 @@
352 'GRID_UNIT_PX', self.grid_unit_px))
353 self.useFixture(fixture_setup.InitctlEnvironmentVariable(
354 global_=True, GRID_UNIT_PX=self.grid_unit_px))
355- super(UnitsTestCase, self).setUp()
356+ super().setUp()
357
358 def test_gu(self):
359 pixels = units.gu(self.WIDTH_IN_GU)
360
361=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py'
362--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py 2015-03-03 13:20:06 +0000
363+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py 2015-04-14 23:11:38 +0000
364@@ -18,10 +18,7 @@
365
366 from autopilot import input
367 from testtools.matchers import GreaterThan, LessThan
368-try:
369- from unittest import mock
370-except ImportError:
371- import mock
372+from unittest import mock
373
374 import ubuntuuitoolkit
375 from ubuntuuitoolkit import tests
376@@ -75,7 +72,7 @@
377 ]
378
379 def setUp(self):
380- super(ToggleTestCase, self).setUp()
381+ super().setUp()
382 self.toggle = self.main_view.select_single(
383 ubuntuuitoolkit.CheckBox, objectName=self.objectName)
384 self.assertFalse(self.toggle.checked)
385
386=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py'
387--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py 2014-04-17 01:11:03 +0000
388+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py 2015-04-14 23:11:38 +0000
389@@ -1,6 +1,6 @@
390 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
391 #
392-# Copyright (C) 2013, 2014 Canonical Ltd.
393+# Copyright (C) 2013, 2014, 2015 Canonical Ltd.
394 #
395 # This program is free software; you can redistribute it and/or modify
396 # it under the terms of the GNU Lesser General Public License as published by
397@@ -18,10 +18,7 @@
398
399 import autopilot
400 from autopilot import platform, input
401-try:
402- from unittest import mock
403-except ImportError:
404- import mock
405+from unittest import mock
406
407 import ubuntuuitoolkit
408 from ubuntuuitoolkit import tests
409
410=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py'
411--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py 2015-03-03 13:20:06 +0000
412+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_date_picker.py 2015-04-14 23:11:38 +0000
413@@ -1,6 +1,6 @@
414 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
415 #
416-# Copyright (C) 2014 Canonical Ltd.
417+# Copyright (C) 2014, 2015 Canonical Ltd.
418 #
419 # This program is free software; you can redistribute it and/or modify
420 # it under the terms of the GNU Lesser General Public License as published by
421@@ -82,7 +82,7 @@
422 """)
423
424 def setUp(self):
425- super(DatePickerBaseTestCase, self).setUp()
426+ super().setUp()
427 self.date_picker = self.main_view.select_single(
428 pickers.DatePicker, objectName='datePicker')
429 self.time_picker = self.main_view.select_single(
430
431=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py'
432--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py 2014-12-17 12:11:51 +0000
433+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py 2015-04-14 23:11:38 +0000
434@@ -1,6 +1,6 @@
435 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
436 #
437-# Copyright (C) 2013, 2014 Canonical Ltd.
438+# Copyright (C) 2013, 2014, 2015 Canonical Ltd.
439 #
440 # This program is free software; you can redistribute it and/or modify
441 # it under the terms of the GNU Lesser General Public License as published by
442@@ -25,9 +25,6 @@
443 test_qml_file_path = os.path.join(
444 dir_path, 'test_dialog.DialogTestCase.qml')
445
446- def setUp(self):
447- super(DialogTestCase, self).setUp()
448-
449 def test_dialog(self):
450 open_button = self.main_view.wait_select_single('Button',
451 objectName='button')
452
453=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py'
454--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2015-03-03 13:20:06 +0000
455+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py 2015-04-14 23:11:38 +0000
456@@ -14,10 +14,7 @@
457 # You should have received a copy of the GNU Lesser General Public License
458 # along with this program. If not, see <http://www.gnu.org/licenses/>.
459
460-try:
461- from unittest import mock
462-except ImportError:
463- import mock
464+from unittest import mock
465
466 import testtools
467 import ubuntuuitoolkit
468@@ -143,7 +140,7 @@
469 """)
470
471 def setUp(self):
472- super(SwipeFlickableTestCase, self).setUp()
473+ super().setUp()
474 self.flickable = self.main_view.select_single(
475 ubuntuuitoolkit.QQuickFlickable, objectName='flickable')
476 self.label = self.main_view.select_single(
477
478=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py'
479--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2015-03-04 16:29:23 +0000
480+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py 2015-04-14 23:11:38 +0000
481@@ -34,7 +34,7 @@
482 'test_header.HideShowTestCase.qml')
483
484 def setUp(self):
485- super(HideShowTestCase, self).setUp()
486+ super().setUp()
487 self.header = self.main_view.get_header()
488
489 def test_ensure_header_visible_must_show_it_when_not_visible(self):
490@@ -70,7 +70,7 @@
491 ]
492
493 def setUp(self):
494- super(ActionsTestCase, self).setUp()
495+ super().setUp()
496 self.header = self.main_view.get_header()
497 self.label = self.app.select_single(
498 'Label', objectName='clicked_label')
499@@ -134,7 +134,7 @@
500 dir_path, 'test_header.SectionsTestCase.qml')
501
502 def setUp(self):
503- super(SectionsTestCase, self).setUp()
504+ super().setUp()
505 self.header = self.main_view.get_header()
506 # initially, section 0 is selected
507 self.assertEqual(self.header.get_selected_section_index(), 0)
508@@ -162,7 +162,7 @@
509 dir_path, 'test_header.DeprecatedHeaderSectionsTestCase.qml')
510
511 def setUp(self):
512- super(DeprecatedHeaderSectionsTestCase, self).setUp()
513+ super().setUp()
514 self.header = self.main_view.get_header()
515
516 def test_get_selection_index(self):
517
518=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py'
519--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-01-15 15:06:02 +0000
520+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py 2015-04-14 23:11:38 +0000
521@@ -27,7 +27,7 @@
522 dir_path, 'test_listitem.ListItemTestCase.qml')
523
524 def setUp(self):
525- super(ListItemTestCase, self).setUp()
526+ super().setUp()
527 self.list_view = self.main_view.select_single(
528 ubuntuuitoolkit.QQuickListView, objectName='test_view')
529 self.test_listitem = self.main_view.select_single(
530
531=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py'
532--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py 2015-03-03 13:20:06 +0000
533+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py 2015-04-14 23:11:38 +0000
534@@ -14,10 +14,7 @@
535 # You should have received a copy of the GNU Lesser General Public License
536 # along with this program. If not, see <http://www.gnu.org/licenses/>.
537
538-try:
539- from unittest import mock
540-except ImportError:
541- import mock
542+from unittest import mock
543
544 import logging
545 import os
546@@ -121,7 +118,7 @@
547 """)
548
549 def setUp(self):
550- super(SwipeToDeleteTestCase, self).setUp()
551+ super().setUp()
552 self._item = self.main_view.select_single(
553 listitems.Standard, objectName='listitem_standard')
554 self.assertTrue(self._item.exists())
555@@ -208,7 +205,7 @@
556 dir_path, 'test_listitems.ExpandableTestCase.qml')
557
558 def setUp(self):
559- super(ExpandableTestCase, self).setUp()
560+ super().setUp()
561 self.test_expandable = self.main_view.select_single(
562 listitems.Expandable, objectName='expandable0')
563
564
565=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py'
566--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py 2015-03-03 13:20:06 +0000
567+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py 2015-04-14 23:11:38 +0000
568@@ -14,10 +14,7 @@
569 # You should have received a copy of the GNU Lesser General Public License
570 # along with this program. If not, see <http://www.gnu.org/licenses/>.
571
572-try:
573- from unittest import mock
574-except ImportError:
575- import mock
576+from unittest import mock
577
578 import ubuntuuitoolkit
579 from ubuntuuitoolkit import tests
580@@ -179,7 +176,7 @@
581 ]
582
583 def setUp(self):
584- super(GoBackTestCase, self).setUp()
585+ super().setUp()
586 self.header = self.main_view.get_header()
587 self.assertEqual(self.header.title, 'Page 0')
588
589
590=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py'
591--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py 2015-03-03 13:20:06 +0000
592+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py 2015-04-14 23:11:38 +0000
593@@ -1,6 +1,6 @@
594 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
595 #
596-# Copyright (C) 2013, 2014 Canonical Ltd.
597+# Copyright (C) 2013, 2014, 2015 Canonical Ltd.
598 #
599 # This program is free software; you can redistribute it and/or modify
600 # it under the terms of the GNU Lesser General Public License as published by
601@@ -68,7 +68,7 @@
602 """)
603
604 def setUp(self):
605- super(OptionSelectorCustomDelegateTestCase, self).setUp()
606+ super().setUp()
607 self.option_selector = self.main_view.select_single(
608 ubuntuuitoolkit.OptionSelector,
609 objectName="test_option_selector_collapsed")
610@@ -151,7 +151,7 @@
611 """)
612
613 def setUp(self):
614- super(OptionSelectorTestCase, self).setUp()
615+ super().setUp()
616 self.option_selector = self.main_view.select_single(
617 ubuntuuitoolkit.OptionSelector,
618 objectName="option_selector")
619
620=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py'
621--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py 2015-03-03 13:20:06 +0000
622+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py 2015-04-14 23:11:38 +0000
623@@ -139,7 +139,7 @@
624 """)
625
626 def setUp(self):
627- super(ComposerSheetTestCase, self).setUp()
628+ super().setUp()
629 self.label = self.main_view.select_single(
630 'Label', objectName='actionLabel')
631 self.assertEqual(self.label.text, 'No action taken.')
632
633=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_pull_to_refresh.py'
634--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_pull_to_refresh.py 2014-09-22 13:19:47 +0000
635+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_pull_to_refresh.py 2015-04-14 23:11:38 +0000
636@@ -1,6 +1,6 @@
637 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
638 #
639-# Copyright (C) 2014 Canonical Ltd.
640+# Copyright (C) 2014, 2015 Canonical Ltd.
641 #
642 # This program is free software; you can redistribute it and/or modify
643 # it under the terms of the GNU Lesser General Public License as published by
644@@ -30,7 +30,7 @@
645 test_qml_file_path = os.path.join(dir_path, 'test_pull_to_refresh.qml')
646
647 def setUp(self):
648- super(PullToRefreshTestCase, self).setUp()
649+ super().setUp()
650 self.label = self.main_view.select_single(
651 'Label', objectName='refreshedLabel')
652 self.assertEqual(self.label.text, 'Not refreshed.')
653
654=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py'
655--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py 2015-03-18 17:06:21 +0000
656+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py 2015-04-14 23:11:38 +0000
657@@ -14,10 +14,7 @@
658 # You should have received a copy of the GNU Lesser General Public License
659 # along with this program. If not, see <http://www.gnu.org/licenses/>.
660
661-try:
662- from unittest import mock
663-except ImportError:
664- import mock
665+from unittest import mock
666
667 import os
668
669@@ -76,7 +73,7 @@
670 """)
671
672 def setUp(self):
673- super(QQuickListViewTestCase, self).setUp()
674+ super().setUp()
675 self.list_view = self.main_view.select_single(
676 ubuntuuitoolkit.QQuickListView, objectName='testListView')
677 self.label = self.main_view.select_single(
678@@ -206,7 +203,7 @@
679 """)
680
681 def setUp(self):
682- super(QQuickListViewOutOfViewTestCase, self).setUp()
683+ super().setUp()
684 self.list_view = self.main_view.select_single(
685 ubuntuuitoolkit.QQuickListView, objectName='testListView')
686 self.label = self.main_view.select_single(
687@@ -238,7 +235,7 @@
688 self.test_qml_file_path = os.path.join(
689 dir_path, self.qml_file_name)
690
691- super(QQuickListViewDraggingBaseTestCase, self).setUp()
692+ super().setUp()
693 self.list_view = self.main_view.select_single(
694 ubuntuuitoolkit.QQuickListView, objectName='test_view')
695
696
697=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py'
698--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py 2014-09-04 13:21:35 +0000
699+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py 2015-04-14 23:11:38 +0000
700@@ -1,6 +1,6 @@
701 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
702 #
703-# Copyright (C) 2013, 2014 Canonical Ltd.
704+# Copyright (C) 2013, 2014, 2015 Canonical Ltd.
705 #
706 # This program is free software; you can redistribute it and/or modify
707 # it under the terms of the GNU Lesser General Public License as published by
708@@ -16,10 +16,7 @@
709
710 import os
711
712-try:
713- from unittest import mock
714-except ImportError:
715- import mock
716+from unittest import mock
717
718 import ubuntuuitoolkit
719 from ubuntuuitoolkit import tests
720
721=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textarea.py'
722--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textarea.py 2015-03-03 13:20:06 +0000
723+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textarea.py 2015-04-14 23:11:38 +0000
724@@ -14,10 +14,7 @@
725 # You should have received a copy of the GNU Lesser General Public License
726 # along with this program. If not, see <http://www.gnu.org/licenses/>.
727
728-try:
729- from unittest import mock
730-except ImportError:
731- import mock
732+from unittest import mock
733
734 from autopilot import platform
735 from testtools.matchers import GreaterThan
736@@ -46,7 +43,7 @@
737 """)
738
739 def setUp(self):
740- super(TextAreaTestCase, self).setUp()
741+ super().setUp()
742 self.simple_text_area = self.main_view.select_single(
743 ubuntuuitoolkit.TextArea, objectName='simple_text_area')
744
745
746=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py'
747--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py 2015-03-03 13:20:06 +0000
748+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py 2015-04-14 23:11:38 +0000
749@@ -14,10 +14,7 @@
750 # You should have received a copy of the GNU Lesser General Public License
751 # along with this program. If not, see <http://www.gnu.org/licenses/>.
752
753-try:
754- from unittest import mock
755-except ImportError:
756- import mock
757+from unittest import mock
758
759 from autopilot import platform
760
761@@ -52,7 +49,7 @@
762 """)
763
764 def setUp(self):
765- super(TextFieldTestCase, self).setUp()
766+ super().setUp()
767 self.simple_text_field = self.main_view.select_single(
768 ubuntuuitoolkit.TextField, objectName='simple_text_field')
769
770
771=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py'
772--- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py 2015-03-03 13:20:06 +0000
773+++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py 2015-04-14 23:11:38 +0000
774@@ -14,10 +14,7 @@
775 # You should have received a copy of the GNU Lesser General Public License
776 # along with this program. If not, see <http://www.gnu.org/licenses/>.
777
778-try:
779- from unittest import mock
780-except ImportError:
781- import mock
782+from unittest import mock
783
784 import ubuntuuitoolkit
785 from ubuntuuitoolkit import tests
786@@ -62,7 +59,7 @@
787 """)
788
789 def setUp(self):
790- super(ToolbarTestCase, self).setUp()
791+ super().setUp()
792 self.toolbar = self.main_view.get_toolbar()
793 # toolbar may be opened or closed now, depending on whether
794 # the application has been deactivated and resumed already
795
796=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py'
797--- tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2014-07-07 17:08:13 +0000
798+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2015-04-14 23:11:38 +0000
799@@ -1,6 +1,6 @@
800 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
801 #
802-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
803+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
804 #
805 # This program is free software; you can redistribute it and/or modify
806 # it under the terms of the GNU Lesser General Public License as published by
807@@ -45,7 +45,7 @@
808 # the app.
809 self.simulate_device()
810
811- super(GalleryTestCase, self).setUp()
812+ super().setUp()
813
814 if self.should_simulate_device():
815 # XXX Currently we have no way to launch the application with a
816@@ -133,7 +133,7 @@
817 element.selected.wait_for(True)
818
819 def tearDown(self):
820- super(GalleryTestCase, self).tearDown()
821+ super().tearDown()
822 # We can't delete the desktop file before we close the application,
823 # so we save it on an attribute to be deleted on tear down.
824 if self.local_desktop_file_path is not None:
825
826=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py'
827--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2014-07-30 18:47:37 +0000
828+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py 2015-04-14 23:11:38 +0000
829@@ -56,7 +56,7 @@
830 def setUp(self):
831 # Reset the locale to English
832 os.environ['LANGUAGE'] = 'en'
833- super(ButtonsTestCase, self).setUp()
834+ super().setUp()
835
836 def test_buttons(self):
837 self.open_page('buttonsElement')
838
839=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py'
840--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2014-07-23 19:27:18 +0000
841+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_optionselector.py 2015-04-14 23:11:38 +0000
842@@ -1,6 +1,6 @@
843 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
844 #
845-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
846+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
847 #
848 # This program is free software; you can redistribute it and/or modify
849 # it under the terms of the GNU Lesser General Public License as published by
850@@ -26,7 +26,7 @@
851 scenarios = ubuntu_scenarios.get_device_simulation_scenarios()
852
853 def setUp(self):
854- super(OptionSelectorTestCase, self).setUp()
855+ super().setUp()
856 self.open_page('optionSelectorsElement')
857
858 def test_select_option_from_collapsed_optionselector(self):
859
860=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py'
861--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py 2014-08-22 17:26:11 +0000
862+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_scrollbar.py 2015-04-14 23:11:38 +0000
863@@ -1,6 +1,6 @@
864 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
865 #
866-# Copyright (C) 2014 Canonical Ltd.
867+# Copyright (C) 2014, 2015 Canonical Ltd.
868 #
869 # This program is free software; you can redistribute it and/or modify
870 # it under the terms of the GNU Lesser General Public License as published by
871@@ -25,7 +25,7 @@
872 scenarios = ubuntu_scenarios.get_device_simulation_scenarios()
873
874 def setUp(self):
875- super(ScrollBarTestCase, self).setUp()
876+ super().setUp()
877 self.open_page('navigationElement')
878 self.scrollbar = self.main_view.wait_select_single(
879 'Scrollbar', objectName="TemplateScrollbar")
880
881=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py'
882--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2014-11-04 01:25:13 +0000
883+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_textinput.py 2015-04-14 23:11:38 +0000
884@@ -1,6 +1,6 @@
885 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
886 #
887-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
888+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
889 #
890 # This program is free software; you can redistribute it and/or modify
891 # it under the terms of the GNU Lesser General Public License as published by
892@@ -56,7 +56,7 @@
893 text_input_scenarios)
894
895 def setUp(self):
896- super(WriteAndClearTextInputTestCase, self).setUp()
897+ super().setUp()
898 # Apply the user locale from the environment
899 # The UITK does the same, so the test must be localized
900 locale.setlocale(locale.LC_ALL, "")
901@@ -83,7 +83,7 @@
902 scenarios = ubuntu_scenarios.get_device_simulation_scenarios()
903
904 def setUp(self):
905- super(DisabledTextInputTestCase, self).setUp()
906+ super().setUp()
907 self.open_page('textinputsElement')
908
909 def test_textfield_disabled(self):
910
911=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py'
912--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2014-06-26 04:24:52 +0000
913+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_toggles.py 2015-04-14 23:11:38 +0000
914@@ -1,6 +1,6 @@
915 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
916 #
917-# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
918+# Copyright (C) 2012, 2013, 2014, 2015 Canonical Ltd.
919 #
920 # This program is free software; you can redistribute it and/or modify
921 # it under the terms of the GNU Lesser General Public License as published by
922@@ -40,7 +40,7 @@
923 toggles_scenarios)
924
925 def setUp(self):
926- super(EnabledTogglesTestCase, self).setUp()
927+ super().setUp()
928 self.open_page('togglesElement')
929
930 def test_change_toggles_state(self):
931@@ -71,7 +71,7 @@
932 toggles_scenarios)
933
934 def setUp(self):
935- super(DisabledTogglesTestCase, self).setUp()
936+ super().setUp()
937 self.open_page('togglesElement')
938
939 def test_change_toggles_state(self):
940
941=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py'
942--- tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2014-08-28 21:34:46 +0000
943+++ tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2015-04-14 23:11:38 +0000
944@@ -1,6 +1,6 @@
945 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
946 #
947-# Copyright (C) 2014 Canonical Ltd.
948+# Copyright (C) 2014, 2015 Canonical Ltd.
949 #
950 # This program is free software; you can redistribute it and/or modify
951 # it under the terms of the GNU Lesser General Public License as published by
952@@ -17,12 +17,7 @@
953 import os
954 import tempfile
955
956-try:
957- # Python 3.
958- from unittest import mock
959-except ImportError:
960- # Python 2 add-on: python-mock.
961- import mock
962+from unittest import mock
963 import testscenarios
964 import testtools
965 from autopilot import (
966@@ -408,7 +403,7 @@
967 if platform.model() != 'Desktop':
968 self.skipTest('Unity 7 runs only on desktop.')
969 self.useFixture(fixture_setup.HideUnity7Launcher())
970- super(HideUnity7LauncherTestCase, self).setUp()
971+ super().setUp()
972
973 def test_maximized_application_must_use_all_screen_width(self):
974 application = self.process_manager.get_running_applications()[0]
975@@ -434,7 +429,7 @@
976 """Fake display with fixed widht and height for use in tests."""
977
978 def __init__(self, width, height):
979- super(FakeDisplay, self).__init__()
980+ super().__init__()
981 self.width = width
982 self.height = height
983
984
985=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_launcher.py'
986--- tests/autopilot/ubuntuuitoolkit/tests/test_launcher.py 2014-11-19 11:59:31 +0000
987+++ tests/autopilot/ubuntuuitoolkit/tests/test_launcher.py 2015-04-14 23:11:38 +0000
988@@ -1,6 +1,6 @@
989 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
990 #
991-# Copyright (C) 2014 Canonical Ltd.
992+# Copyright (C) 2014, 2015 Canonical Ltd.
993 #
994 # This program is free software; you can redistribute it and/or modify
995 # it under the terms of the GNU Lesser General Public License as published by
996@@ -30,9 +30,6 @@
997 command_line.append('-touch')
998 return command_line
999
1000- def setUp(self):
1001- super(LauncherTouchTestCase, self).setUp()
1002-
1003 def test_apparent_touch_screen(self):
1004 textfield = self.main_view.select_single(objectName="textarea")
1005 # Trigger handlers as a courtesy to a watching person
1006@@ -46,9 +43,6 @@
1007 test_qml_file_path = os.path.join(
1008 dir_path, 'test_launcher.testcase.qml')
1009
1010- def setUp(self):
1011- super(LauncherQtTestTestCase, self).setUp()
1012-
1013 def test_can_run_qt_test_case(self):
1014 textfield = self.main_view.select_single(objectName="textarea")
1015 self.assertThat(textfield.text,
1016
1017=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py'
1018--- tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py 2014-07-08 05:52:48 +0000
1019+++ tests/autopilot/ubuntuuitoolkit/tests/test_ubuntu_scenarios.py 2015-04-14 23:11:38 +0000
1020@@ -1,6 +1,6 @@
1021 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1022 #
1023-# Copyright (C) 2014 Canonical Ltd.
1024+# Copyright (C) 2014, 2015 Canonical Ltd.
1025 #
1026 # This program is free software; you can redistribute it and/or modify
1027 # it under the terms of the GNU Lesser General Public License as published by
1028@@ -14,10 +14,7 @@
1029 # You should have received a copy of the GNU Lesser General Public License
1030 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1031
1032-try:
1033- from unittest import mock
1034-except ImportError:
1035- import mock
1036+from unittest import mock
1037
1038 import testtools
1039
1040
1041=== modified file 'tests/tests.pro'
1042--- tests/tests.pro 2015-01-20 09:56:46 +0000
1043+++ tests/tests.pro 2015-04-14 23:11:38 +0000
1044@@ -4,12 +4,9 @@
1045 autopilot_module.path = /usr/lib/python3/dist-packages/ubuntuuitoolkit
1046 autopilot_module.files = autopilot/ubuntuuitoolkit/*
1047
1048-autopilot2_module.path = /usr/lib/python2.7/dist-packages/ubuntuuitoolkit
1049-autopilot2_module.files = autopilot/ubuntuuitoolkit/*
1050-
1051 SUBDIRS += launcher
1052
1053-INSTALLS += autopilot_module autopilot2_module
1054+INSTALLS += autopilot_module
1055
1056 check.commands += cd ..;
1057 check.commands += tests/qmlapicheck.sh || exit 1;

Subscribers

People subscribed via source and target branches