@@ -125,11 +125,16 @@ class UnityTestCase(AutopilotTestCase):
125125
126126 # Hide Unity launcher
127127 self._unityshell_schema = Gio.Settings.new_with_path(
128− UNITYSHELL_GSETTINGS_SCHEMA, UNITYSHELL_GSETTINGS_PATH)
128+ UNITYSHELL_GSETTINGS_SCHEMA,
129+ UNITYSHELL_GSETTINGS_PATH,
130+ )
129131 self._launcher_hide_mode = self._unityshell_schema.get_int(
130− UNITYSHELL_LAUNCHER_KEY)
132+ UNITYSHELL_LAUNCHER_KEY,
133+ )
131134 self._unityshell_schema.set_int(
132− UNITYSHELL_LAUNCHER_KEY, UNITYSHELL_LAUNCHER_MODE)
135+ UNITYSHELL_LAUNCHER_KEY,
136+ UNITYSHELL_LAUNCHER_MODE,
137+ )
133138 self.addCleanup(self._reset_launcher)
134139
135140 self._proxy = None
@@ -151,7 +156,9 @@ class UnityTestCase(AutopilotTestCase):
151156 def _reset_launcher(self):
152157 """Reset Unity launcher hide mode"""
153158 self._unityshell_schema.set_int(
154− UNITYSHELL_LAUNCHER_KEY, self._launcher_hide_mode)
159+ UNITYSHELL_LAUNCHER_KEY,
160+ self._launcher_hide_mode,
161+ )
155162
156163 def _setup_display_details(self):
157164 scale_divisor = self._determine_geometry()
@@ -233,7 +240,9 @@ class UnityTestCase(AutopilotTestCase):
233240 logger.info("Resetting upstart env %s to %s", key, value)
234241 if value is None:
235242 subprocess.call(
236− ["/sbin/initctl", "unset-env", key], stderr=subprocess.STDOUT)
243+ ["/sbin/initctl", "unset-env", key],
244+ stderr=subprocess.STDOUT,
245+ )
237246 else:
238247 subprocess.call([
239248 "/sbin/initctl",
@@ -276,7 +285,7 @@ class UnityTestCase(AutopilotTestCase):
276285
277286 app_proxy = self._launch_unity_with_upstart(
278287 binary_path,
279− self.unity_geometry_args
288+ self.unity_geometry_args,
280289 )
281290
282291 self._set_proxy(app_proxy)
@@ -295,14 +304,16 @@ class UnityTestCase(AutopilotTestCase):
295304 binary_arg = "BINARY=%s" % binary_path
296305 extra_args = "ARGS=%s" % " ".join(args)
297306
298− output = subprocess.check_output([
299− "/sbin/initctl",
300− "start",
301− "unity8",
302− binary_arg,
303− extra_args
304− ] + ["%s=%s" % (k, v) for k, v in self._environment.iteritems()],
305− stderr=subprocess.STDOUT)
307+ output = subprocess.check_output(
308+ [
309+ "/sbin/initctl",
310+ "start",
311+ "unity8",
312+ binary_arg,
313+ extra_args,
314+ ] + ["%s=%s" % (k, v) for k, v in self._environment.iteritems()],
315+ stderr=subprocess.STDOUT,
316+ )
306317
307318 self.addCleanup(self._cleanup_launching_upstart_unity)
308319
@@ -387,7 +398,7 @@ class UnityTestCase(AutopilotTestCase):
387398 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
388399
389400 def get_dash(self):
390− dash = self._proxy.select_single(Dash)
401+ dash = self._proxy.wait_select_single(Dash)
391402 return dash
392403
393404 @property