on xenial help sign in
pep8 compliance
fe3c605Christopher Lee
tests/autopilot/unity8/shell/emulators/main_window.py+4−1
@@ -74,7 +74,10 @@ class MainWindow(object):
74 return self.app.select_single(Launcher)
74 return self.app.select_single(Launcher)
75
75
76 def get_pinPadLoader(self):
76 def get_pinPadLoader(self):
77− return self.app.select_single("QQuickLoader", objectName="pinPadLoader")
77+ return self.app.select_single(
78+ "QQuickLoader",
79+ objectName="pinPadLoader"
80+ )
78
81
79 def get_pinPadButton(self, buttonId):
82 def get_pinPadButton(self, buttonId):
80 return self.app.select_single(
83 return self.app.select_single(
tests/autopilot/unity8/shell/tests/__init__.py+4−3
@@ -127,7 +127,8 @@ class Unity8TestCase(AutopilotTestCase):
127 binary_path = get_unity8_binary_path()
127 binary_path = get_unity8_binary_path()
128 lib_path = get_lib_path()
128 lib_path = get_lib_path()
129
129
130+ logger.info(
130− logger.info("Lib path is '%s', binary path is '%s'",
131+ "Lib path is '%s', binary path is '%s'",
131 lib_path,
132 lib_path,
132 binary_path
133 binary_path
133 )
134 )
@@ -156,8 +157,8 @@ class Unity8TestCase(AutopilotTestCase):
156 self.patch_environment('QML2_IMPORT_PATH', mocks_library_path)
157 self.patch_environment('QML2_IMPORT_PATH', mocks_library_path)
157
158
158 def _set_proxy(self, proxy):
159 def _set_proxy(self, proxy):
159− """Keep a copy of the proxy object, so we can use it to get common parts
160+ """Keep a copy of the proxy object, so we can use it to get common
160− of the shell later on.
161+ parts of the shell later on.
161
162
162 """
163 """
163 self._proxy = proxy
164 self._proxy = proxy
tests/autopilot/unity8/shell/tests/test_hud.py+8−4
@@ -39,7 +39,9 @@ class TestHud(Unity8TestCase):
39
39
40 @with_lightdm_mock("single")
40 @with_lightdm_mock("single")
41 def test_show_hud_button_appears(self):
41 def test_show_hud_button_appears(self):
42− """Swiping up while an app is active must show the 'show hud' button."""
42+ """Swiping up while an app is active must show the 'show hud' button.
43+
44+ """
43 self.launch_unity()
45 self.launch_unity()
44 self.main_window.get_greeter().unlock()
46 self.main_window.get_greeter().unlock()
45 window = self.main_window.get_qml_view()
47 window = self.main_window.get_qml_view()
@@ -58,7 +60,9 @@ class TestHud(Unity8TestCase):
58
60
59 @with_lightdm_mock("single")
61 @with_lightdm_mock("single")
60 def test_show_hud_appears(self):
62 def test_show_hud_appears(self):
61− """Releasing the touch on the 'show hud' button must display the hud."""
63+ """Releasing the touch on the 'show hud' button must display the hud.
64+
65+ """
62 self.launch_unity()
66 self.launch_unity()
63 self.main_window.get_greeter().unlock()
67 self.main_window.get_greeter().unlock()
64 window = self.main_window.get_qml_view()
68 window = self.main_window.get_qml_view()
@@ -96,8 +100,8 @@ class TestHud(Unity8TestCase):
96
100
97 @with_lightdm_mock("single")
101 @with_lightdm_mock("single")
98 def test_hide_hud_dragging(self):
102 def test_hide_hud_dragging(self):
99− """Once open the Hud must close if the upper bar is dragged and released
103+ """Once open the Hud must close if the upper bar is dragged and
100− downward.
104+ released downward.
101
105
102 """
106 """
103 self.launch_unity()
107 self.launch_unity()
tests/autopilot/unity8/shell/tests/test_lock_screen.py+2−2
@@ -91,9 +91,9 @@ class TestLockscreen(Unity8TestCase):
91
91
92 def _wait_for_lockscreen(self):
92 def _wait_for_lockscreen(self):
93 """Wait for the lock screen to load, and return it."""
93 """Wait for the lock screen to load, and return it."""
94− pinPadLoader = self.main_window.get_pinPadLoader();
94+ pinPadLoader = self.main_window.get_pinPadLoader()
95 self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
95 self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
96− lockscreen = self.main_window.get_lockscreen();
96+ lockscreen = self.main_window.get_lockscreen()
97 self.assertThat(lockscreen.shown, Eventually(Equals(True)))
97 self.assertThat(lockscreen.shown, Eventually(Equals(True)))
98 return lockscreen
98 return lockscreen
99
99