Fixture to launch the indicator test service.
Definition at line 291 of file fixture_setup.py.
◆ __init__()
lomiri.fixture_setup.LaunchMockIndicatorService.__init__ |
( |
| self, |
|
|
| action_delay, |
|
|
| ensure_not_running = True ) |
Initialize an instance.
:param action_delay: The delay to use when activating actions.
Measured in milliseconds. Value of -1 will result in infinite delay.
:type action_delay: An integer.
:param boolean ensure_not_running: Make sure service is not running
Definition at line 295 of file fixture_setup.py.
295 def __init__(self, action_delay, ensure_not_running=True):
296 """Initialize an instance.
297
298 :param action_delay: The delay to use when activating actions.
299 Measured in milliseconds. Value of -1 will result in infinite delay.
300 :type action_delay: An integer.
301 :param boolean ensure_not_running: Make sure service is not running
302
303 """
304 super(LaunchMockIndicatorService, self).__init__()
305 self.action_delay = action_delay
306 self.ensure_not_running = ensure_not_running
307
◆ ensure_service_not_running()
lomiri.fixture_setup.LaunchMockIndicatorService.ensure_service_not_running |
( |
| self | ) |
|
Definition at line 327 of file fixture_setup.py.
327 def ensure_service_not_running(self):
328 if process_helpers.is_job_running('lomiri-mock-indicator-service'):
329 self.stop_service()
◆ launch_service()
lomiri.fixture_setup.LaunchMockIndicatorService.launch_service |
( |
| self | ) |
|
Definition at line 315 of file fixture_setup.py.
315 def launch_service(self):
316 logger.info("Starting lomiri-mock-indicator-service")
317 binary_path = get_binary_path('lomiri-mock-indicator-service')
318 binary_arg = 'BINARY={}'.format(binary_path)
319 env_args = 'ARGS=-t {}'.format(self.action_delay)
320 all_args = [binary_arg, env_args]
321 process_helpers.start_job('lomiri-mock-indicator-service', *all_args)
322
◆ setUp()
lomiri.fixture_setup.LaunchMockIndicatorService.setUp |
( |
| self | ) |
|
Definition at line 308 of file fixture_setup.py.
308 def setUp(self):
309 super().setUp()
310 if self.ensure_not_running:
311 self.ensure_service_not_running()
312 self.addCleanup(self.stop_service)
313 self.application_proxy = self.launch_service()
314
◆ stop_service()
lomiri.fixture_setup.LaunchMockIndicatorService.stop_service |
( |
| self | ) |
|
Definition at line 323 of file fixture_setup.py.
323 def stop_service(self):
324 logger.info("Stopping lomiri-mock-indicator-service")
325 process_helpers.stop_job('lomiri-mock-indicator-service')
326
◆ action_delay
lomiri.fixture_setup.LaunchMockIndicatorService.action_delay = action_delay |
◆ application_proxy
lomiri.fixture_setup.LaunchMockIndicatorService.application_proxy = self.launch_service() |
◆ ensure_not_running
lomiri.fixture_setup.LaunchMockIndicatorService.ensure_not_running = ensure_not_running |
◆ stop_service
lomiri.fixture_setup.LaunchMockIndicatorService.stop_service |
The documentation for this class was generated from the following file: