async def test_run_simulated_device(ovshell: testing.OpenVarioShellStub) -> None: # GIVEN samplefile = os.path.join(HERE, "samples", "sample.nmea") # WHEN devsim.run_simulated_device(ovshell, samplefile) # THEN devs = ovshell.devices.enumerate() assert len(devs) == 1 assert isinstance(devs[0], devsim.SimulatedDeviceImpl)
def start(self) -> None: self.shell.processes.start(serial.maintain_serial_devices(self.shell)) gpsstate = gpstime.GPSTimeState() self.shell.processes.start(gpstime.gps_time_sync(self.shell, gpsstate)) self.shell.processes.start(gpstime.clock_indicator(self.shell.screen, gpsstate)) simfile = os.environ.get("OVSHELL_CORE_SIMULATE_DEVICE") if simfile: devsim.run_simulated_device(self.shell, simfile) self.shell.processes.start(devindicators.show_device_indicators(self.shell))