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 252 of file __init__.py.

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

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