Merge lp:~brandontschaefer/unity/python3-start-moving-over-AP-tests into lp:unity

Proposed by Brandon Schaefer
Status: Work in progress
Proposed branch: lp:~brandontschaefer/unity/python3-start-moving-over-AP-tests
Merge into: lp:unity
Diff against target: 87 lines (+7/-8)
6 files modified
tests/autopilot/unity/emulators/X11.py (+1/-1)
tests/autopilot/unity/emulators/compiz.py (+1/-2)
tests/autopilot/unity/emulators/hud.py (+1/-1)
tests/autopilot/unity/tests/test_gnome_key_grabber.py (+1/-1)
tests/autopilot/unity/tests/test_ibus.py (+1/-1)
tests/autopilot/unity/tests/test_shopping_lens.py (+2/-2)
To merge this branch: bzr merge lp:~brandontschaefer/unity/python3-start-moving-over-AP-tests
Reviewer Review Type Date Requested Status
Christopher Townsend Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+213931@code.launchpad.net

Commit message

A few simple changes, as we need to start moving our AP tests over to python3.

Description of the change

A few simple changes, as we need to start moving our AP tests over to python3.

The next largest hurdle will be getting compizconfig python3 compliant....

To test install:
  apt-get install python3-autopilot

Then run (in unity/tests/autopilot/)
  python3 -c "import unity.tests"
OR
  autopilot3 list unity.tests

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Umm, it's not clear to me why you had to change stuff in DecorationsDataPool.[h|cpp] for this MP.

review: Needs Information
Revision history for this message
Christopher Townsend (townsend) wrote :

And unityshell.cpp for that matter...

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

That was me merging a branch from Marco. Opps, i swore i removed that and checked what files I was changed...strange.

3756. By Brandon Schaefer

* Merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Well, this breaks running regular Autopilot, so until we fix *everything* to run strictly on python3, then this needs to fixed up to work for both python2.7 and python3.

review: Needs Fixing

Unmerged revisions

3756. By Brandon Schaefer

* Merge trunk

3755. By Brandon Schaefer

* Start moving to python3 for unity7 AP tests.
* Need to move compizconfig over before we can do much more

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/unity/emulators/X11.py'
--- tests/autopilot/unity/emulators/X11.py 2014-01-13 18:35:11 +0000
+++ tests/autopilot/unity/emulators/X11.py 2014-04-03 15:54:35 +0000
@@ -90,7 +90,7 @@
90 """90 """
91 try:91 try:
92 glxinfo_out = subprocess.check_output("glxinfo")92 glxinfo_out = subprocess.check_output("glxinfo")
93 except OSError, e:93 except OSError:
94 raise OSError("Failed to run glxinfo: %s. (do you have mesa-utils installed?)" % e)94 raise OSError("Failed to run glxinfo: %s. (do you have mesa-utils installed?)" % e)
9595
96 for dri in _blacklisted_drivers:96 for dri in _blacklisted_drivers:
9797
=== modified file 'tests/autopilot/unity/emulators/compiz.py'
--- tests/autopilot/unity/emulators/compiz.py 2013-04-30 22:06:54 +0000
+++ tests/autopilot/unity/emulators/compiz.py 2014-04-03 15:54:35 +0000
@@ -1,9 +1,8 @@
1from __future__ import absolute_import1from __future__ import absolute_import
2from __future__ import absolute_import
23
3"""Functions that wrap compizconfig to avoid some unpleasantness in that module."""4"""Functions that wrap compizconfig to avoid some unpleasantness in that module."""
45
5from __future__ import absolute_import
6
7from autopilot.utilities import Silence6from autopilot.utilities import Silence
87
9_global_context = None8_global_context = None
109
=== modified file 'tests/autopilot/unity/emulators/hud.py'
--- tests/autopilot/unity/emulators/hud.py 2013-10-03 01:33:53 +0000
+++ tests/autopilot/unity/emulators/hud.py 2014-04-03 15:54:35 +0000
@@ -14,7 +14,7 @@
14from autopilot.input import Keyboard14from autopilot.input import Keyboard
15from autopilot.introspection.dbus import StateNotFoundError15from autopilot.introspection.dbus import StateNotFoundError
16from autopilot.keybindings import KeybindingsHelper16from autopilot.keybindings import KeybindingsHelper
17from HTMLParser import HTMLParser17from html.parser import HTMLParser
18import re18import re
1919
20from unity.emulators import UnityIntrospectionObject20from unity.emulators import UnityIntrospectionObject
2121
=== modified file 'tests/autopilot/unity/tests/test_gnome_key_grabber.py'
--- tests/autopilot/unity/tests/test_gnome_key_grabber.py 2014-02-06 09:31:09 +0000
+++ tests/autopilot/unity/tests/test_gnome_key_grabber.py 2014-04-03 15:54:35 +0000
@@ -7,7 +7,7 @@
7# by the Free Software Foundation.7# by the Free Software Foundation.
88
9import dbus9import dbus
10import glib10from gi.repository import GLib
11import unity11import unity
12import logging12import logging
1313
1414
=== modified file 'tests/autopilot/unity/tests/test_ibus.py'
--- tests/autopilot/unity/tests/test_ibus.py 2014-01-29 19:21:24 +0000
+++ tests/autopilot/unity/tests/test_ibus.py 2014-04-03 15:54:35 +0000
@@ -85,7 +85,7 @@
85 timeout.start()85 timeout.start()
86 while self._context.get_engine() is None:86 while self._context.get_engine() is None:
87 if self._abort is True:87 if self._abort is True:
88 print "Error! Could not set the engine correctly."88 print("Error! Could not set the engine correctly.")
89 return None89 return None
90 continue90 continue
91 timeout.cancel()91 timeout.cancel()
9292
=== modified file 'tests/autopilot/unity/tests/test_shopping_lens.py'
--- tests/autopilot/unity/tests/test_shopping_lens.py 2013-05-24 15:54:49 +0000
+++ tests/autopilot/unity/tests/test_shopping_lens.py 2014-04-03 15:54:35 +0000
@@ -11,7 +11,7 @@
11from autopilot.matchers import Eventually11from autopilot.matchers import Eventually
12from testtools.matchers import Equals, GreaterThan12from testtools.matchers import Equals, GreaterThan
13from time import sleep13from time import sleep
14import urllib214from urllib.request import urlopen
15import gettext15import gettext
1616
17from unity.tests import UnityTestCase17from unity.tests import UnityTestCase
@@ -24,7 +24,7 @@
24 super(ShoppingScopeTests, self).setUp()24 super(ShoppingScopeTests, self).setUp()
25 try:25 try:
26 urllib2.urlopen("http://www.google.com", timeout=2)26 urllib2.urlopen("http://www.google.com", timeout=2)
27 except urllib2.URLError, e:27 except urllib2.URLError:
28 self.skip("Skipping test, no internet connection")28 self.skip("Skipping test, no internet connection")
29 gettext.install("unity-scope-shopping")29 gettext.install("unity-scope-shopping")
3030