on xenial help sign in
Fix flake8 warnings
f7eb3eeMichał Sawicz
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py−2
@@ -22,9 +22,7 @@
22import logging
22import logging
23import os
23import os
24
24
25−from autopilot.matchers import Eventually
26from autopilot.platform import model
25from autopilot.platform import model
27−from testtools.matchers import Equals
28
26
29from unity8 import process_helpers
27from unity8 import process_helpers
30from unity8.application_lifecycle import tests
28from unity8.application_lifecycle import tests
tests/autopilot/unity8/fixture_setup.py+2
@@ -31,6 +31,7 @@ from unity8.shell import emulators
31
31
32logger = logging.getLogger(__name__)
32logger = logging.getLogger(__name__)
33
33
34+
34class LaunchDashApp(fixtures.Fixture):
35class LaunchDashApp(fixtures.Fixture):
35
36
36 """Fixture to launch the Dash app."""
37 """Fixture to launch the Dash app."""
@@ -102,6 +103,7 @@ class DisplayRotationLock(fixtures.Fixture):
102 ]
103 ]
103 subprocess.check_output(command)
104 subprocess.check_output(command)
104
105
106+
105class LaunchMockIndicatorService(fixtures.Fixture):
107class LaunchMockIndicatorService(fixtures.Fixture):
106
108
107 """Fixture to launch the indicator test service."""
109 """Fixture to launch the indicator test service."""
tests/autopilot/unity8/greeter/tests/__init__.py+3−1
@@ -20,7 +20,9 @@
20from unity8.shell.emulators import main_window as main_window_emulator
20from unity8.shell.emulators import main_window as main_window_emulator
21from unity8.shell.tests import UnityTestCase
21from unity8.shell.tests import UnityTestCase
22
22
23+
23class GreeterTestCase(UnityTestCase):
24class GreeterTestCase(UnityTestCase):
24 def get_shell(self, unity_proxy):
25 def get_shell(self, unity_proxy):
26+ main_window = \
25− main_window = unity_proxy.select_single(main_window_emulator.QQuickView)
27+ unity_proxy.select_single(main_window_emulator.QQuickView)
26 return main_window.select_single('Shell')
28 return main_window.select_single('Shell')
tests/autopilot/unity8/greeter/tests/test_args.py+4−2
@@ -19,6 +19,7 @@
19
19
20from unity8.greeter.tests import GreeterTestCase
20from unity8.greeter.tests import GreeterTestCase
21
21
22+
22class GreeterArgsTest(GreeterTestCase):
23class GreeterArgsTest(GreeterTestCase):
23
24
24 DEFAULT_SHELL_MODE = 'full-greeter'
25 DEFAULT_SHELL_MODE = 'full-greeter'
@@ -43,8 +44,9 @@ class GreeterArgsTest(GreeterTestCase):
43 unity_proxy = self.launch_unity(mode=self.NONEXISTENT_MODE)
44 unity_proxy = self.launch_unity(mode=self.NONEXISTENT_MODE)
44 shell = self.get_shell(unity_proxy)
45 shell = self.get_shell(unity_proxy)
45 self.assertTrue(shell.testShellMode == self.DEFAULT_SHELL_MODE,
46 self.assertTrue(shell.testShellMode == self.DEFAULT_SHELL_MODE,
46− "Shell mode was {} but should have been {}".format(
47+ "Shell mode was {} but should have been {}"
48+ .format(shell.testShellMode,
47− shell.testShellMode, self.DEFAULT_SHELL_MODE))
49+ self.DEFAULT_SHELL_MODE))
48
50
49 def test_shell_mode(self):
51 def test_shell_mode(self):
50 unity_proxy = self.launch_unity(mode='shell')
52 unity_proxy = self.launch_unity(mode='shell')
tests/autopilot/unity8/indicators/__init__.py+5−4
@@ -19,7 +19,6 @@ import ubuntuuitoolkit
19from autopilot import introspection
19from autopilot import introspection
20
20
21from unity8.shell import emulators
21from unity8.shell import emulators
22−from unity8 import fixture_setup
23
22
24
23
25class IndicatorPage(emulators.UnityEmulatorBase):
24class IndicatorPage(emulators.UnityEmulatorBase):
@@ -34,6 +33,7 @@ class IndicatorPage(emulators.UnityEmulatorBase):
34 def validate_dbus_object(cls, path, state):
33 def validate_dbus_object(cls, path, state):
35 return False
34 return False
36
35
36+
37class Indicator():
37class Indicator():
38
38
39 def __init__(self, main_window, name):
39 def __init__(self, main_window, name):
@@ -98,7 +98,8 @@ class Indicator():
98class DisplayIndicator(Indicator):
98class DisplayIndicator(Indicator):
99
99
100 def __init__(self, main_window):
100 def __init__(self, main_window):
101− super(DisplayIndicator, self).__init__(main_window, 'indicator-rotation-lock')
101+ super(DisplayIndicator, self).__init__(main_window,
102+ 'indicator-rotation-lock')
102 self._main_window = main_window
103 self._main_window = main_window
103
104
104
105
@@ -189,7 +190,7 @@ class Slider(emulators.UnityEmulatorBase):
189 stop_x = x
190 stop_x = x
190
191
191 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
192 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
192− self.value.wait_for(self.minimumValue, timeout);
193+ self.value.wait_for(self.minimumValue, timeout)
193
194
194 def slide_right(self, timeout=10):
195 def slide_right(self, timeout=10):
195 x, y, width, height = self.globalRect
196 x, y, width, height = self.globalRect
@@ -200,4 +201,4 @@ class Slider(emulators.UnityEmulatorBase):
200 stop_x = x + width
201 stop_x = x + width
201
202
202 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
203 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
203− self.value.wait_for(self.maximumValue, timeout);
204+ self.value.wait_for(self.maximumValue, timeout)
tests/autopilot/unity8/indicators/tests/__init__.py+1
@@ -31,6 +31,7 @@ class IndicatorTestCase(tests.UnityTestCase):
31 self.unity_proxy = self.launch_unity()
31 self.unity_proxy = self.launch_unity()
32 process_helpers.unlock_unity(self.unity_proxy)
32 process_helpers.unlock_unity(self.unity_proxy)
33
33
34+
34class DeviceIndicatorTestCase(IndicatorTestCase):
35class DeviceIndicatorTestCase(IndicatorTestCase):
35
36
36 def setUp(self):
37 def setUp(self):
tests/autopilot/unity8/indicators/tests/test_action_latency.py+21−18
@@ -21,19 +21,16 @@ from testscenarios import multiply_scenarios
21from unity8 import (
21from unity8 import (
22 fixture_setup,
22 fixture_setup,
23 indicators,
23 indicators,
24− process_helpers
25)
24)
26−from unity8.shell import tests
27from unity8.indicators import tests
25from unity8.indicators import tests
28
26
29from autopilot.matchers import Eventually
27from autopilot.matchers import Eventually
30from testtools.matchers import Equals, NotEquals
28from testtools.matchers import Equals, NotEquals
31−import time
32
29
33
30
34class TestIndicatorBaseTestCase(tests.IndicatorTestCase):
31class TestIndicatorBaseTestCase(tests.IndicatorTestCase):
35
32
36− scenarios = [ tests.IndicatorTestCase.device_emulation_scenarios[0] ]
33+ scenarios = [tests.IndicatorTestCase.device_emulation_scenarios[0]]
37
34
38 def setUp(self):
35 def setUp(self):
39 super(TestIndicatorBaseTestCase, self).setUp()
36 super(TestIndicatorBaseTestCase, self).setUp()
@@ -49,7 +46,8 @@ class TestIndicatorBaseTestCase(tests.IndicatorTestCase):
49 self.indicator_page = self.indicator.open()
46 self.indicator_page = self.indicator.open()
50
47
51 def launch_indicator_service(self):
48 def launch_indicator_service(self):
49+ launch_service_fixture = \
52− launch_service_fixture = fixture_setup.LaunchMockIndicatorService(self.action_delay)
50+ fixture_setup.LaunchMockIndicatorService(self.action_delay)
53 self.useFixture(launch_service_fixture)
51 self.useFixture(launch_service_fixture)
54
52
55
53
@@ -95,6 +93,7 @@ class TestServerValueUpdate(TestIndicatorBaseTestCase):
95 Eventually(Equals(slider.value), timeout=20)
93 Eventually(Equals(slider.value), timeout=20)
96 )
94 )
97
95
96+
98class TestBuffering(TestIndicatorBaseTestCase):
97class TestBuffering(TestIndicatorBaseTestCase):
99
98
100 """Test that switching multiple times will buffer activations
99 """Test that switching multiple times will buffer activations
@@ -107,11 +106,11 @@ class TestBuffering(TestIndicatorBaseTestCase):
107
106
108 switch = self.indicator_page.get_switcher()
107 switch = self.indicator_page.get_switcher()
109 switch.change_state()
108 switch.change_state()
110− intermediate_value = switch.checked;
109+ intermediate_value = switch.checked
111
110
112 # will buffer change until it receives the change from server
111 # will buffer change until it receives the change from server
113 switch.change_state()
112 switch.change_state()
114− final_value = switch.checked;
113+ final_value = switch.checked
115
114
116 # backend will respond to first switch.
115 # backend will respond to first switch.
117 switch_menu = self.indicator_page.get_switch_menu()
116 switch_menu = self.indicator_page.get_switch_menu()
@@ -121,7 +120,8 @@ class TestBuffering(TestIndicatorBaseTestCase):
121 )
120 )
122 # The buffered activation should have gone to server now.
121 # The buffered activation should have gone to server now.
123
122
124− # front-end should not change as a result of server update while it is buffered
123+ # front-end should not change as a result of server update
124+ # while it is buffered
125 self.assertThat(
125 self.assertThat(
126 switch.checked,
126 switch.checked,
127 Equals(final_value)
127 Equals(final_value)
@@ -142,15 +142,15 @@ class TestBuffering(TestIndicatorBaseTestCase):
142 def test_slider_buffers_activations(self):
142 def test_slider_buffers_activations(self):
143
143
144 slider = self.indicator_page.get_slider()
144 slider = self.indicator_page.get_slider()
145− original_value = slider.value;
145+ original_value = slider.value
146 slider.slide_left()
146 slider.slide_left()
147
147
148 # will buffer change until it receives the change from server
148 # will buffer change until it receives the change from server
149 slider.slide_right()
149 slider.slide_right()
150− final_value = slider.value;
150+ final_value = slider.value
151
151
152− # backend will respond to first slider. Since it's a live slider it'll probably
152+ # backend will respond to first slider. Since it's a live slider
153− # be a random value along the slide.
153+ # it'll probably be a random value along the slide.
154 slider_menu = self.indicator_page.get_slider_menu()
154 slider_menu = self.indicator_page.get_slider_menu()
155 self.assertThat(
155 self.assertThat(
156 slider_menu.serverValue,
156 slider_menu.serverValue,
@@ -163,7 +163,8 @@ class TestBuffering(TestIndicatorBaseTestCase):
163 NotEquals(final_value)
163 NotEquals(final_value)
164 )
164 )
165
165
166− # front-end should not change as a result of server update while it is buffered
166+ # front-end should not change as a result of server update
167+ # while it is buffered
167 self.assertThat(
168 self.assertThat(
168 slider.value,
169 slider.value,
169 Equals(final_value)
170 Equals(final_value)
@@ -189,17 +190,18 @@ class TestClientRevertsToServerValue(TestIndicatorBaseTestCase):
189
190
190 See https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1390136 .
191 See https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1390136 .
191 """
192 """
192− action_delay = -1 # never action.
193+ action_delay = -1 # never action.
193
194
194 def test_switch_reverts_on_late_response(self):
195 def test_switch_reverts_on_late_response(self):
195
196
196 switch = self.indicator_page.get_switcher()
197 switch = self.indicator_page.get_switcher()
197 switch_menu = self.indicator_page.get_switch_menu()
198 switch_menu = self.indicator_page.get_switch_menu()
198
199
199− original_value = switch.checked;
200+ original_value = switch.checked
200 switch.change_state()
201 switch.change_state()
201
202
202− # switch should revert to original value after 5 seconds (30 seconds in real usage)
203+ # switch should revert to original value after 5 seconds
204+ # (30 seconds in real usage)
203 self.assertThat(
205 self.assertThat(
204 switch.checked,
206 switch.checked,
205 Eventually(Equals(original_value), timeout=20)
207 Eventually(Equals(original_value), timeout=20)
@@ -216,10 +218,11 @@ class TestClientRevertsToServerValue(TestIndicatorBaseTestCase):
216 slider = self.indicator_page.get_slider()
218 slider = self.indicator_page.get_slider()
217 slider_menu = self.indicator_page.get_slider_menu()
219 slider_menu = self.indicator_page.get_slider_menu()
218
220
219− original_value = slider.value;
221+ original_value = slider.value
220 slider.slide_left()
222 slider.slide_left()
221
223
222− # slider should revert to original value after 5 seconds (30 seconds in real usage)
224+ # slider should revert to original value after 5 seconds
225+ # (30 seconds in real usage)
223 self.assertThat(
226 self.assertThat(
224 slider.value,
227 slider.value,
225 Eventually(Equals(original_value), timeout=20)
228 Eventually(Equals(original_value), timeout=20)
tests/autopilot/unity8/shell/emulators/dash.py+15−10
@@ -92,7 +92,7 @@ class Dash(emulators.UnityEmulatorBase):
92 aux = self.dash_content_list.get_children_by_type('QQuickItem')[0]
92 aux = self.dash_content_list.get_children_by_type('QQuickItem')[0]
93 for l in aux.get_children_by_type('QQuickLoader'):
93 for l in aux.get_children_by_type('QQuickLoader'):
94 if (l.scopeId == scope_id):
94 if (l.scopeId == scope_id):
95− return l;
95+ return l
96 raise emulators.UnityEmulatorException(
96 raise emulators.UnityEmulatorException(
97 'No scope found with id {0}'.format(scope_id))
97 'No scope found with id {0}'.format(scope_id))
98 except dbus.StateNotFoundError:
98 except dbus.StateNotFoundError:
@@ -100,7 +100,7 @@ class Dash(emulators.UnityEmulatorBase):
100 'No scope found with id {0}'.format(scope_id))
100 'No scope found with id {0}'.format(scope_id))
101
101
102 def _get_scope_from_loader(self, loader):
102 def _get_scope_from_loader(self, loader):
103− return loader.wait_select_single('GenericScopeView');
103+ return loader.wait_select_single('GenericScopeView')
104
104
105 def _open_scope_scrolling(self, scope_loader):
105 def _open_scope_scrolling(self, scope_loader):
106 scroll = self._get_scroll_direction(scope_loader)
106 scroll = self._get_scroll_direction(scope_loader)
@@ -132,7 +132,7 @@ class Dash(emulators.UnityEmulatorBase):
132 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
132 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
133 rate = 10
133 rate = 10
134 divisions = 5
134 divisions = 5
135− jump = ( width / divisions ) // rate * rate
135+ jump = (width / divisions) // rate * rate
136 start_x = x + jump
136 start_x = x + jump
137 stop_x = x + jump * (divisions - 1)
137 stop_x = x + jump * (divisions - 1)
138 start_y = stop_y = y + 1
138 start_y = stop_y = y + 1
@@ -148,7 +148,7 @@ class Dash(emulators.UnityEmulatorBase):
148 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
148 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
149 rate = 10
149 rate = 10
150 divisions = 5
150 divisions = 5
151− jump = ( width / divisions ) // rate * rate
151+ jump = (width / divisions) // rate * rate
152 start_x = x + jump * (divisions - 1)
152 start_x = x + jump * (divisions - 1)
153 stop_x = x + jump
153 stop_x = x + jump
154 start_y = stop_y = y + 1
154 start_y = stop_y = y + 1
@@ -157,16 +157,19 @@ class Dash(emulators.UnityEmulatorBase):
157
157
158 def enter_search_query(self, query):
158 def enter_search_query(self, query):
159 current_header = self._get_current_page_header()
159 current_header = self._get_current_page_header()
160+ search_button = \
160− search_button = current_header.select_single(objectName="search_header_button")
161+ current_header.select_single(objectName="search_header_button")
162+ self.pointing_device.move(
161− self.pointing_device.move(search_button.globalRect.x + search_button.width / 2,
163+ search_button.globalRect.x + search_button.width / 2,
162− search_button.globalRect.y + search_button.height / 2)
164+ search_button.globalRect.y + search_button.height / 2)
163 self.pointing_device.click()
165 self.pointing_device.click()
164 headerContainer = current_header.select_single(
166 headerContainer = current_header.select_single(
165 objectName="headerContainer")
167 objectName="headerContainer")
166 headerContainer.contentY.wait_for(0)
168 headerContainer.contentY.wait_for(0)
167 search_text_field = self._get_search_text_field()
169 search_text_field = self._get_search_text_field()
168 search_text_field.write(query)
170 search_text_field.write(query)
169− self.select_single(objectName="processingIndicator").visible.wait_for(False)
171+ self.select_single(objectName="processingIndicator")\
172+ .visible.wait_for(False)
170
173
171 def _get_search_text_field(self):
174 def _get_search_text_field(self):
172 page_header = self._get_current_page_header()
175 page_header = self._get_current_page_header()
@@ -217,13 +220,15 @@ class GenericScopeView(emulators.UnityEmulatorBase):
217
220
218 """
221 """
219 category_element = self._get_category_element(category)
222 category_element = self._get_category_element(category)
220− icon = category_element.wait_select_single('AbstractButton', title=title)
223+ icon = category_element.wait_select_single('AbstractButton',
224+ title=title)
221 self.pointing_device.click_object(icon)
225 self.pointing_device.click_object(icon)
222
226
223 def _get_category_element(self, category):
227 def _get_category_element(self, category):
224 try:
228 try:
225 return self.wait_select_single(
229 return self.wait_select_single(
230+ 'DashCategoryBase',
226− 'DashCategoryBase', objectName='dashCategory{}'.format(category))
231+ objectName='dashCategory{}'.format(category))
227 except dbus.StateNotFoundError:
232 except dbus.StateNotFoundError:
228 raise emulators.UnityEmulatorException(
233 raise emulators.UnityEmulatorException(
229 'No category found with name {}'.format(category))
234 'No category found with name {}'.format(category))
tests/autopilot/unity8/shell/emulators/greeter.py−1
@@ -42,7 +42,6 @@ class Greeter(UnityEmulatorBase):
42
42
43 raise AssertionError("Greeter cover page still up after 10s")
43 raise AssertionError("Greeter cover page still up after 10s")
44
44
45−
46 def swipe(self):
45 def swipe(self):
47 """Swipe the greeter screen away."""
46 """Swipe the greeter screen away."""
48 self.waiting.wait_for(False)
47 self.waiting.wait_for(False)
tests/autopilot/unity8/shell/emulators/tutorial.py−1
@@ -18,7 +18,6 @@
18#
18#
19
19
20import logging
20import logging
21−import time
22
21
23import ubuntuuitoolkit
22import ubuntuuitoolkit
24
23
tests/autopilot/unity8/shell/tests/__init__.py+1
@@ -65,6 +65,7 @@ UNITYSHELL_GSETTINGS_PATH = "/org/compiz/profiles/unity/plugins/unityshell/"
65UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
65UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
66UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
66UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
67
67
68+
68def _get_device_emulation_scenarios(devices='All'):
69def _get_device_emulation_scenarios(devices='All'):
69 nexus4 = ('Desktop Nexus 4',
70 nexus4 = ('Desktop Nexus 4',
70 dict(app_width=768, app_height=1280, grid_unit_px=18))
71 dict(app_width=768, app_height=1280, grid_unit_px=18))
tests/autopilot/unity8/shell/tests/test_lock_screen.py+4−4
@@ -41,7 +41,7 @@ class TestLockscreen(UnityTestCase):
41
41
42 if not greeter.tabletMode:
42 if not greeter.tabletMode:
43 greeter.swipe()
43 greeter.swipe()
44− lockscreen = self._wait_for_lockscreen()
44+ self._wait_for_lockscreen()
45 self.main_window.enter_pin_code("1234")
45 self.main_window.enter_pin_code("1234")
46 else:
46 else:
47 self._enter_prompt_passphrase("1234\n")
47 self._enter_prompt_passphrase("1234\n")
@@ -56,7 +56,7 @@ class TestLockscreen(UnityTestCase):
56
56
57 if not greeter.tabletMode:
57 if not greeter.tabletMode:
58 greeter.swipe()
58 greeter.swipe()
59− lockscreen = self._wait_for_lockscreen()
59+ self._wait_for_lockscreen()
60 self._enter_pin_passphrase("password")
60 self._enter_pin_passphrase("password")
61 else:
61 else:
62 self._enter_prompt_passphrase("password")
62 self._enter_prompt_passphrase("password")
@@ -70,7 +70,7 @@ class TestLockscreen(UnityTestCase):
70
70
71 if not greeter.tabletMode:
71 if not greeter.tabletMode:
72 greeter.swipe()
72 greeter.swipe()
73− lockscreen = self._wait_for_lockscreen()
73+ self._wait_for_lockscreen()
74 self.main_window.enter_pin_code("4321")
74 self.main_window.enter_pin_code("4321")
75 pinentryField = self.main_window.get_pinentryField()
75 pinentryField = self.main_window.get_pinentryField()
76 self.assertThat(pinentryField.text, Eventually(Equals("")))
76 self.assertThat(pinentryField.text, Eventually(Equals("")))
@@ -88,7 +88,7 @@ class TestLockscreen(UnityTestCase):
88
88
89 if not greeter.tabletMode:
89 if not greeter.tabletMode:
90 greeter.swipe()
90 greeter.swipe()
91− lockscreen = self._wait_for_lockscreen()
91+ self._wait_for_lockscreen()
92 self._enter_pin_passphrase("foobar")
92 self._enter_pin_passphrase("foobar")
93 pinentryField = self.main_window.get_pinentryField()
93 pinentryField = self.main_window.get_pinentryField()
94 self.assertThat(pinentryField.text, Eventually(Equals("")))
94 self.assertThat(pinentryField.text, Eventually(Equals("")))
tests/autopilot/unity8/shell/tests/test_notifications.py+14−6
@@ -127,7 +127,7 @@ class InteractiveNotificationBase(NotificationsBase):
127 actions = [("action_id", "dummy")]
127 actions = [("action_id", "dummy")]
128 hints = [
128 hints = [
129 ("x-canonical-switch-to-application", "true"),
129 ("x-canonical-switch-to-application", "true"),
130− ("x-canonical-secondary-icon","dialer")
130+ ("x-canonical-secondary-icon", "dialer")
131 ]
131 ]
132
132
133 self._create_interactive_notification(
133 self._create_interactive_notification(
@@ -150,7 +150,9 @@ class InteractiveNotificationBase(NotificationsBase):
150 self.assert_notification_action_id_was_called('action_id')
150 self.assert_notification_action_id_was_called('action_id')
151
151
152 def test_sd_one_over_two_layout(self):
152 def test_sd_one_over_two_layout(self):
153− """Snap-decision with three actions should use one-over two button layout."""
153+ """Snap-decision with three actions should use
154+ one-over two button layout.
155+ """
154 unity_proxy = self.launch_unity()
156 unity_proxy = self.launch_unity()
155 unlock_unity(unity_proxy)
157 unlock_unity(unity_proxy)
156
158
@@ -189,7 +191,9 @@ class InteractiveNotificationBase(NotificationsBase):
189 self.assert_notification_action_id_was_called("action_accept")
191 self.assert_notification_action_id_was_called("action_accept")
190
192
191 def test_modal_sd_without_greeter(self):
193 def test_modal_sd_without_greeter(self):
192− """Snap-decision should block input to shell without greeter/lockscreen."""
194+ """Snap-decision should block input to shell
195+ without greeter/lockscreen.
196+ """
193 unity_proxy = self.launch_unity()
197 unity_proxy = self.launch_unity()
194 unlock_unity(unity_proxy)
198 unlock_unity(unity_proxy)
195
199
@@ -236,7 +240,9 @@ class InteractiveNotificationBase(NotificationsBase):
236 self.assert_notification_action_id_was_called("action_accept")
240 self.assert_notification_action_id_was_called("action_accept")
237
241
238 def test_modal_sd_with_greeter(self):
242 def test_modal_sd_with_greeter(self):
239− """A snap-decision should block input to the greeter/lockscreen beneath it."""
243+ """A snap-decision should block input to the
244+ greeter/lockscreen beneath it.
245+ """
240 self.launch_unity()
246 self.launch_unity()
241
247
242 summary = "Incoming file"
248 summary = "Incoming file"
@@ -350,7 +356,9 @@ class InteractiveNotificationBase(NotificationsBase):
350 raise RuntimeError("Call to script failed with: %s" % error_output)
356 raise RuntimeError("Call to script failed with: %s" % error_output)
351
357
352 def _get_notify_script(self):
358 def _get_notify_script(self):
353− """Returns the path to the interactive notification creation script."""
359+ """Returns the path to the interactive notification
360+ creation script.
361+ """
354 file_path = "../../emulators/create_interactive_notification.py"
362 file_path = "../../emulators/create_interactive_notification.py"
355
363
356 the_path = os.path.abspath(
364 the_path = os.path.abspath(
@@ -454,7 +462,7 @@ class EphemeralNotificationsTests(NotificationsBase):
454
462
455 summary = "Upload of image completed"
463 summary = "Upload of image completed"
456 icon_path = self._get_icon_path('applicationIcons/facebook.png')
464 icon_path = self._get_icon_path('applicationIcons/facebook.png')
457− hints=[]
465+ hints = []
458
466
459 notification = shell.create_ephemeral_notification(
467 notification = shell.create_ephemeral_notification(
460 summary,
468 summary,
tests/autopilot/unity8/shell/tests/test_tutorial.py−1
@@ -25,7 +25,6 @@ from unity8.shell import (
25 tests
25 tests
26)
26)
27# unused import to load the tutorial emulators custom proxy objects.
27# unused import to load the tutorial emulators custom proxy objects.
28−from unity8.shell.emulators import tutorial # NOQA
29
28
30
29
31class TutorialTestCase(tests.UnityTestCase):
30class TutorialTestCase(tests.UnityTestCase):