on xenial help sign in
pep8 compliance
commitfe3c605e7be9fd6797275427b581cf436393531e authorChristopher Lee <chris.lee@canonical.com> dateMon 22 Jul 2013, 17:02 (13 years ago) parentdaccaf4
4 files changed+18−10
tests/autopilot/unity8/shell/emulators/main_window.py+4−1 tests/autopilot/unity8/shell/tests/__init__.py+4−3 tests/autopilot/unity8/shell/tests/test_hud.py+8−4 tests/autopilot/unity8/shell/tests/test_lock_screen.py+2−2
tests/autopilot/unity8/shell/emulators/main_window.py+4−1
@@ -74,7 +74,10 @@ class MainWindow(object):
7474 return self.app.select_single(Launcher)
7575
7676 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+ )
7881
7982 def get_pinPadButton(self, buttonId):
8083 return self.app.select_single(
tests/autopilot/unity8/shell/tests/__init__.py+4−3
@@ -127,7 +127,8 @@ class Unity8TestCase(AutopilotTestCase):
127127 binary_path = get_unity8_binary_path()
128128 lib_path = get_lib_path()
129129
130− logger.info("Lib path is '%s', binary path is '%s'",
130+ logger.info(
131+ "Lib path is '%s', binary path is '%s'",
131132 lib_path,
132133 binary_path
133134 )
@@ -156,8 +157,8 @@ class Unity8TestCase(AutopilotTestCase):
156157 self.patch_environment('QML2_IMPORT_PATH', mocks_library_path)
157158
158159 def _set_proxy(self, proxy):
159− """Keep a copy of the proxy object, so we can use it to get common parts
160− of the shell later on.
160+ """Keep a copy of the proxy object, so we can use it to get common
161+ parts of the shell later on.
161162
162163 """
163164 self._proxy = proxy
tests/autopilot/unity8/shell/tests/test_hud.py+8−4
@@ -39,7 +39,9 @@ class TestHud(Unity8TestCase):
3939
4040 @with_lightdm_mock("single")
4141 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+ """
4345 self.launch_unity()
4446 self.main_window.get_greeter().unlock()
4547 window = self.main_window.get_qml_view()
@@ -58,7 +60,9 @@ class TestHud(Unity8TestCase):
5860
5961 @with_lightdm_mock("single")
6062 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+ """
6266 self.launch_unity()
6367 self.main_window.get_greeter().unlock()
6468 window = self.main_window.get_qml_view()
@@ -96,8 +100,8 @@ class TestHud(Unity8TestCase):
96100
97101 @with_lightdm_mock("single")
98102 def test_hide_hud_dragging(self):
99− """Once open the Hud must close if the upper bar is dragged and released
100− downward.
103+ """Once open the Hud must close if the upper bar is dragged and
104+ released downward.
101105
102106 """
103107 self.launch_unity()
tests/autopilot/unity8/shell/tests/test_lock_screen.py+2−2
@@ -91,9 +91,9 @@ class TestLockscreen(Unity8TestCase):
9191
9292 def _wait_for_lockscreen(self):
9393 """Wait for the lock screen to load, and return it."""
94− pinPadLoader = self.main_window.get_pinPadLoader();
94+ pinPadLoader = self.main_window.get_pinPadLoader()
9595 self.assertThat(pinPadLoader.progress, Eventually(Equals(1)))
96− lockscreen = self.main_window.get_lockscreen();
96+ lockscreen = self.main_window.get_lockscreen()
9797 self.assertThat(lockscreen.shown, Eventually(Equals(True)))
9898 return lockscreen
9999