Loading...
Searching...
No Matches
lomiri.fixture_setup.LaunchDashApp Class Reference

## Public Member Functions

| __init__ (self, binary_path, variables)
| setUp (self)
| launch_application (self)
| stop_application (self)

## Public Attributes

| binary_path = binary_path
| variables = variables
| stop_application
| application_proxy = self.launch_application()

## Detailed Description

    Fixture to launch the Dash app.

Definition at line 219 of file fixture_setup.py.

## Constructor & Destructor Documentation

## __init__()

lomiri.fixture_setup.LaunchDashApp.__init__ | ( |  | self,
|  |  | binary_path,
|  |  | variables )

    Initialize an instance.

    :param str binary_path: The path to the Dash app binary.
    :param variables: The variables to use when launching the app.
    :type variables: A dictionary.

Definition at line 223 of file fixture_setup.py.

def __init__(self, binary_path, variables):
"""Initialize an instance.
:param str binary_path: The path to the Dash app binary.
:param variables: The variables to use when launching the app.
:type variables: A dictionary.
"""
super().__init__()
self.binary_path = binary_path
self.variables = variables

## Member Function Documentation

## launch_application()

lomiri.fixture_setup.LaunchDashApp.launch_application | ( |  | self | ) |

Definition at line 241 of file fixture_setup.py.

def launch_application(self):
binary_arg = 'BINARY={}'.format(self.binary_path)
testability_arg = 'QT_LOAD_TESTABILITY={}'.format(1)
env_args = [
'{}={}'.format(key, value) for key, value in self.variables.items()
]
all_args = [binary_arg, testability_arg] + env_args
pid = process_helpers.start_job('lomiri-dash', *all_args)
return introspection.get_proxy_object_for_existing_process(
pid=pid,
emulator_base=lomiriuitoolkit.LomiriUIToolkitCustomProxyObjectBase
)

## setUp()

lomiri.fixture_setup.LaunchDashApp.setUp | ( |  | self | ) |

    Launch the dash app when the fixture is used.

Definition at line 235 of file fixture_setup.py.

def setUp(self):
"""Launch the dash app when the fixture is used."""
super().setUp()
self.addCleanup(self.stop_application)
self.application_proxy = self.launch_application()

## stop_application()

lomiri.fixture_setup.LaunchDashApp.stop_application | ( |  | self | ) |

Definition at line 255 of file fixture_setup.py.

def stop_application(self):
process_helpers.stop_job('lomiri-dash')

## Member Data Documentation

## application_proxy

lomiri.fixture_setup.LaunchDashApp.application_proxy = self.launch_application()

Definition at line 239 of file fixture_setup.py.

## binary_path

lomiri.fixture_setup.LaunchDashApp.binary_path = binary_path

Definition at line 232 of file fixture_setup.py.

## stop_application

lomiri.fixture_setup.LaunchDashApp.stop_application

Definition at line 238 of file fixture_setup.py.

## variables

lomiri.fixture_setup.LaunchDashApp.variables = variables

Definition at line 233 of file fixture_setup.py.

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

- tests/autopilot/lomiri/fixture_setup.py