diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 10:53:10 +0200 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 10:53:10 +0200 |
commit | af1784badbede08bc14cf1f15085f2111c608cfc (patch) | |
tree | fbffa71f341751b4d9f702c98ca25dadd225d9e9 /lab_control | |
parent | e21146472566f75c071798d63e388104e22c6001 (diff) |
Minor improvement to JDS6600 mock device
Diffstat (limited to 'lab_control')
-rw-r--r-- | lab_control/test/jds6600_test.py | 1 | ||||
-rw-r--r-- | lab_control/test/mock_jds6600_device.py | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lab_control/test/jds6600_test.py b/lab_control/test/jds6600_test.py index e9089c0..817ccf4 100644 --- a/lab_control/test/jds6600_test.py +++ b/lab_control/test/jds6600_test.py @@ -74,3 +74,4 @@ def test_invalidChannel(uut): with pytest.raises(AssertionError): uut.setOff(ch) + diff --git a/lab_control/test/mock_jds6600_device.py b/lab_control/test/mock_jds6600_device.py index 6db4f4c..979ec69 100644 --- a/lab_control/test/mock_jds6600_device.py +++ b/lab_control/test/mock_jds6600_device.py @@ -69,11 +69,14 @@ class MockJDS6600Device(): shape = int(args[0]) self._channels[ch].function = shape + return ":ok\r\n" + elif opcode == "r": if function == 20: return f":r20={int(self._channels[0].on)},{int(self._channels[1].on)}.\r\n" - - return ":ok\r\n" + + # Unknown request format, no response + return None def stop(self) -> None: self._masterFile.close() |