Lomiri
lomiri.fixture_setup.LaunchLomiriWithFakeSensors Class Reference

Inherits fixtures.Fixture.

Public Member Functions

def setUp (self)
 

Public Attributes

 fake_sensors
 

Static Public Attributes

 lomiri_proxy = None
 
 main_win = None
 

Detailed Description

Fixture to launch Lomiri with an injectable sensors backend.

:ivar lomiri_proxy: The Autopilot proxy object for the Lomiri shell.

Definition at line 46 of file fixture_setup.py.

Member Function Documentation

◆ setUp()

def lomiri.fixture_setup.LaunchLomiriWithFakeSensors.setUp (   self)
Restart Lomiri with testability and create sensors.

Definition at line 57 of file fixture_setup.py.

57 def setUp(self):
58 """Restart Lomiri with testability and create sensors."""
59 super().setUp()
60 self.useFixture(
61 fixture_setup.InitctlEnvironmentVariable(
62 LOMIRI_PLATFORM_API_TEST_OVERRIDE='sensors'))
63
64 self.addCleanup(process_helpers.stop_job, 'lomiri')
65 restart_thread = threading.Thread(
66 target=self._restart_lomiri_with_testability)
67 restart_thread.start()
68
69 self._create_sensors()
70
71 restart_thread.join()
72 self.fake_sensors = sensors.FakePlatformSensors()
73

Member Data Documentation

◆ fake_sensors

lomiri.fixture_setup.LaunchLomiriWithFakeSensors.fake_sensors

Definition at line 72 of file fixture_setup.py.

◆ lomiri_proxy

lomiri.fixture_setup.LaunchLomiriWithFakeSensors.lomiri_proxy = None
static

Definition at line 54 of file fixture_setup.py.

◆ main_win

lomiri.fixture_setup.LaunchLomiriWithFakeSensors.main_win = None
static

Definition at line 55 of file fixture_setup.py.


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