Unity 8
 All Classes Functions Properties
unity8.shell.tests.UnityTestCase Class Reference
Inheritance diagram for unity8.shell.tests.UnityTestCase:

Public Member Functions

def setUpClass
 
def setUp
 
def launch_unity
 
def patch_lightdm_mock
 
def assertUnityReady
 
def get_dash
 
def main_window
 

Public Attributes

 touch
 
 unity_geometry_args
 
 grid_size
 

Detailed Description

A test case base class for the Unity shell tests.

Definition at line 81 of file __init__.py.

Member Function Documentation

def unity8.shell.tests.UnityTestCase.launch_unity (   self,
  kwargs 
)
Launch the unity shell, return a proxy object for it.

Definition at line 251 of file __init__.py.

252  def launch_unity(self, **kwargs):
253  """Launch the unity shell, return a proxy object for it."""
254  binary_path = get_binary_path()
255  lib_path = get_lib_path()
256 
257  logger.info(
258  "Lib path is '%s', binary path is '%s'",
259  lib_path,
260  binary_path
261  )
262 
263  if self._lightdm_mock_type is None:
264  self.patch_lightdm_mock()
265 
266  if self._qml_mock_enabled:
268 
269  if self._data_dirs_mock_enabled:
270  self._patch_data_dirs()
271 
272  # FIXME: we shouldn't be doing this
273  # $MIR_SOCKET, fallback to $XDG_RUNTIME_DIR/mir_socket and
274  # /tmp/mir_socket as last resort
275  try:
276  os.unlink(
277  os.getenv('MIR_SOCKET',
278  os.path.join(os.getenv('XDG_RUNTIME_DIR', "/tmp"),
279  "mir_socket")))
280  except OSError:
281  pass
282  try:
283  os.unlink("/tmp/mir_socket")
284  except OSError:
285  pass
286 
287  app_proxy = self._launch_unity_with_upstart(
288  binary_path,
289  self.unity_geometry_args,
290  )
291 
292  self._set_proxy(app_proxy)
293 
294  # Ensure that the dash is visible before we return:
295  logger.debug("Unity started, waiting for it to be ready.")
296  self.assertUnityReady()
297  logger.debug("Unity loaded and ready.")
298 
299  return app_proxy

The documentation for this class was generated from the following file: