From af1784badbede08bc14cf1f15085f2111c608cfc Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 31 May 2022 10:53:10 +0200 Subject: Minor improvement to JDS6600 mock device --- lab_control/test/jds6600_test.py | 1 + lab_control/test/mock_jds6600_device.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lab_control') 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() -- cgit v1.2.3