Provide a device simulator for testing. Automatically starts and stops the simulator.
()
| 127 | |
| 128 | @pytest.fixture |
| 129 | def device_simulator(): |
| 130 | """ |
| 131 | Provide a device simulator for testing. |
| 132 | |
| 133 | Automatically starts and stops the simulator. |
| 134 | """ |
| 135 | sim = DeviceSimulator(host="127.0.0.1", port=9000, protocol="tcp") |
| 136 | sim.start() |
| 137 | |
| 138 | yield sim |
| 139 | |
| 140 | sim.stop() |
| 141 | |
| 142 | |
| 143 | @pytest.fixture |
nothing calls this directly
no test coverage detected