on xenial help sign in
Minor pep8 fixes
9181b78Christopher Lee
tests/autopilot/unity8/shell/tests/__init__.py+7−3
@@ -51,7 +51,8 @@ logger = logging.getLogger(__name__)
51UNITYSHELL_GSETTINGS_SCHEMA = "org.compiz.unityshell"
51UNITYSHELL_GSETTINGS_SCHEMA = "org.compiz.unityshell"
52UNITYSHELL_GSETTINGS_PATH = "/org/compiz/profiles/unity/plugins/unityshell/"
52UNITYSHELL_GSETTINGS_PATH = "/org/compiz/profiles/unity/plugins/unityshell/"
53UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
53UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
54−UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
54+UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
55+
55
56
56def _get_device_emulation_scenarios(devices='All'):
57def _get_device_emulation_scenarios(devices='All'):
57 nexus4 = ('Desktop Nexus 4',
58 nexus4 = ('Desktop Nexus 4',
@@ -69,10 +70,13 @@ def _get_device_emulation_scenarios(devices='All'):
69 elif devices == 'Nexus10':
70 elif devices == 'Nexus10':
70 return [nexus10]
71 return [nexus10]
71 else:
72 else:
73+ raise RuntimeError(
72− raise RuntimeError('Unrecognized device-option "%s" passed.' % devices)
74+ 'Unrecognized device-option "%s" passed.' % devices
75+ )
73 else:
76 else:
74 return [native]
77 return [native]
75
78
79+
76class UnityTestCase(AutopilotTestCase):
80class UnityTestCase(AutopilotTestCase):
77
81
78 """A test case base class for the Unity shell tests."""
82 """A test case base class for the Unity shell tests."""
@@ -125,7 +129,7 @@ class UnityTestCase(AutopilotTestCase):
125 self._setup_display_details()
129 self._setup_display_details()
126
130
127 self._using_upstart = False
131 self._using_upstart = False
128− if model() != "Desktop": # or check env
132+ if model() != "Desktop": # or check env
129 self._using_upstart = True
133 self._using_upstart = True
130
134
131 def _reset_launcher(self):
135 def _reset_launcher(self):