Fixture to launch the Dash app.
Definition at line 219 of file fixture_setup.py.
◆ __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.
223 def __init__(self, binary_path, variables):
224 """Initialize an instance.
225
226 :param str binary_path: The path to the Dash app binary.
227 :param variables: The variables to use when launching the app.
228 :type variables: A dictionary.
229
230 """
231 super().__init__()
232 self.binary_path = binary_path
233 self.variables = variables
234
◆ launch_application()
lomiri.fixture_setup.LaunchDashApp.launch_application |
( |
| self | ) |
|
Definition at line 241 of file fixture_setup.py.
241 def launch_application(self):
242 binary_arg = 'BINARY={}'.format(self.binary_path)
243 testability_arg = 'QT_LOAD_TESTABILITY={}'.format(1)
244 env_args = [
245 '{}={}'.format(key, value) for key, value in self.variables.items()
246 ]
247 all_args = [binary_arg, testability_arg] + env_args
248
249 pid = process_helpers.start_job('lomiri-dash', *all_args)
250 return introspection.get_proxy_object_for_existing_process(
251 pid=pid,
252 emulator_base=lomiriuitoolkit.LomiriUIToolkitCustomProxyObjectBase
253 )
254
◆ 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.
235 def setUp(self):
236 """Launch the dash app when the fixture is used."""
237 super().setUp()
238 self.addCleanup(self.stop_application)
239 self.application_proxy = self.launch_application()
240
◆ stop_application()
lomiri.fixture_setup.LaunchDashApp.stop_application |
( |
| self | ) |
|
Definition at line 255 of file fixture_setup.py.
255 def stop_application(self):
256 process_helpers.stop_job('lomiri-dash')
257
258
◆ application_proxy
lomiri.fixture_setup.LaunchDashApp.application_proxy = self.launch_application() |
◆ binary_path
lomiri.fixture_setup.LaunchDashApp.binary_path = binary_path |
◆ stop_application
lomiri.fixture_setup.LaunchDashApp.stop_application |
◆ variables
lomiri.fixture_setup.LaunchDashApp.variables = variables |
The documentation for this class was generated from the following file: