port tests to python3

Bug #1320211 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings-online-accounts (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

We should move the autopilot tests to python 3.

Tags: patch

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

This is my current patch which attemps to do that. However, it fails with

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/autopilot/utilities.py", line 351, in action_on_test_end
    obj.on_test_end(test_instance)
  File "/usr/lib/python3/dist-packages/autopilot/input/_X11.py", line 493, in on_test_end
    move_mouse_to_screen(0)
  File "/usr/lib/python3/dist-packages/autopilot/display/__init__.py", line 59, in move_mouse_to_screen
    Mouse.create().move(x, y, False)
  File "/usr/lib/python3/dist-packages/autopilot/input/__init__.py", line 298, in create
    return _pick_backend(backends, preferred_backend)
  File "/usr/lib/python3/dist-packages/autopilot/utilities.py", line 65, in _pick_backend
    "Unable to instantiate any backends\n%s" % '\n'.join(failure_reasons))
RuntimeError: Unable to instantiate any backends
X11: DisplayConnectionError(':99', b'No protocol specified\n')
}}}

python3-evdev and python3-xlib are installed, so I don't have a good idea what's wrong here. Attaching the patch here to avoid losing it, as I need to stop working on this now.

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
importance: Undecided → Low
tags: added: patch
Revision history for this message
Martin Pitt (pitti) wrote :

I know what's wrong. We need https://code.launchpad.net/~pitti/autopilot/sandbox-run/+merge/219982 to land in the distro before we can port this to py3.

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Martin Pitt (pitti)
Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.