@@ -12,11 +12,8 @@ from collections import namedtuple
12from unity8.shell import with_lightdm_mock
12from unity8.shell import with_lightdm_mock
13from unity8.shell.tests import Unity8TestCase, _get_device_emulation_scenarios
13from unity8.shell.tests import Unity8TestCase, _get_device_emulation_scenarios
15−from autopilot.display import Display
16−from autopilot.input import Touch
17−from testtools.matchers import Equals, MismatchError
15+from testtools.matchers import Equals
18from autopilot.matchers import Eventually
16from autopilot.matchers import Eventually
19−from autopilot.platform import model
22SwipeCoords = namedtuple('SwipeCoords', 'start_x end_x start_y end_y')
19SwipeCoords = namedtuple('SwipeCoords', 'start_x end_x start_y end_y')
@@ -35,7 +32,6 @@ class TestHud(Unity8TestCase):
35 self.main_window.get_greeter().unlock()
32 self.main_window.get_greeter().unlock()
36 window = self.main_window.get_qml_view()
33 window = self.main_window.get_qml_view()
37 hud_show_button = self.main_window.get_hud_show_button()
34 hud_show_button = self.main_window.get_hud_show_button()
38− hud = self.main_window.get_hud()
40 self._launch_test_app_from_app_screen()
36 self._launch_test_app_from_app_screen()
@@ -173,7 +169,8 @@ class TestHud(Unity8TestCase):
174 # Ensure application is open
170 # Ensure application is open
175 bottombar = self.main_window.get_bottombar()
171 bottombar = self.main_window.get_bottombar()
176− self.assertThat(bottombar.applicationIsOnForeground, Eventually(Equals(True)))
172+ self.assertThat(bottombar.applicationIsOnForeground,
173+ Eventually(Equals(True)))
178 # Because some tests are manually manipulating the finger, we want to
175 # Because some tests are manually manipulating the finger, we want to
179 # cleanup if the test fails, but we don't want to fail with an exception if
176 # cleanup if the test fails, but we don't want to fail with an exception if
@@ -191,7 +188,7 @@ class TestHud(Unity8TestCase):
192 start_x = int(main_view.x + (main_view.width / 2))
189 start_x = int(main_view.x + (main_view.width / 2))
193 end_x = start_x
190 end_x = start_x
194− start_y = main_view.y + (main_view.height -3)
191+ start_y = main_view.y + (main_view.height - 3)
195 end_y = int(hud_show_button.y + (hud_show_button.height/2))
192 end_y = int(hud_show_button.y + (hud_show_button.height/2))
197 return SwipeCoords(start_x, end_x, start_y, end_y)
194 return SwipeCoords(start_x, end_x, start_y, end_y)