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

Inherits fixtures.Fixture.

Public Member Functions

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

Public Attributes

 binary_path
 
 variables
 
 stop_application
 
 application_proxy
 

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.

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

Member Function Documentation

◆ 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

Member Data Documentation

◆ application_proxy

lomiri.fixture_setup.LaunchDashApp.application_proxy

Definition at line 239 of file fixture_setup.py.

◆ binary_path

lomiri.fixture_setup.LaunchDashApp.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

Definition at line 233 of file fixture_setup.py.


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