on xenial help sign in
Prepare unity8 to the _uinput refactors in autopilot.
3e13f6eLeo Arias
tests/autopilot/unity8/shell/__init__.py+2−2
@@ -55,8 +55,8 @@ class DragMixin(object):
55 dx = 1.0 * (x2 - x1) / 100
55 dx = 1.0 * (x2 - x1) / 100
56 dy = 1.0 * (y2 - y1) / 100
56 dy = 1.0 * (y2 - y1) / 100
57 for i in range(0, 100):
57 for i in range(0, 100):
58− self.touch._finger_move(int(cur_x), int(cur_y))
58+ self.touch._device.finger_move(int(cur_x), int(cur_y))
59 sleep(0.002)
59 sleep(0.002)
60 cur_x += dx
60 cur_x += dx
61 cur_y += dy
61 cur_y += dy
62− self.touch._finger_move(int(x2), int(y2))
62+ self.touch._device.finger_move(int(x2), int(y2))
tests/autopilot/unity8/shell/emulators/hud.py+1−1
@@ -54,7 +54,7 @@ class Hud(UnityEmulatorBase, DragMixin):
54 except AssertionError:
54 except AssertionError:
55 raise
55 raise
56 finally:
56 finally:
57− if self.touch._touch_finger is not None:
57+ if self.touch.pressed:
58 self.touch.release()
58 self.touch.release()
59
59
60 def dismiss(self):
60 def dismiss(self):
tests/autopilot/unity8/shell/tests/test_hud.py+1−1
@@ -187,5 +187,5 @@ class TestHud(UnityTestCase, DragMixin):
187 # we don't.
187 # we don't.
188 def _maybe_release_finger(self):
188 def _maybe_release_finger(self):
189 """Only release the finger if it is in fact down."""
189 """Only release the finger if it is in fact down."""
190− if self.touch._touch_finger is not None:
190+ if self.touch.pressed:
191 self.touch.release()
191 self.touch.release()