diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 10:47:06 +0200 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 10:47:06 +0200 |
commit | e21146472566f75c071798d63e388104e22c6001 (patch) | |
tree | d7e039de7c9ccffaff2ee2c99e8bb7e7984a7f45 /lab_control/test | |
parent | 26416e3d8cddc3663b69a8e2e9064137afd4b345 (diff) |
Implemented JDS6600 setFrequency
Diffstat (limited to 'lab_control/test')
-rw-r--r-- | lab_control/test/jds6600_test.py | 4 | ||||
-rw-r--r-- | lab_control/test/mock_jds6600_device.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lab_control/test/jds6600_test.py b/lab_control/test/jds6600_test.py index c53388a..e9089c0 100644 --- a/lab_control/test/jds6600_test.py +++ b/lab_control/test/jds6600_test.py @@ -44,8 +44,8 @@ def test_channelOnAndOff(uut, mockDevice): uut.setOff(ch) assert not mockDevice.isOn(ch) -def disabled_test_setFrequency(uut, mockDevice): - checkNumericalParameter([0.0, 100.0, 100000.0], uut.setFrequency, mockDevice.getFrequency) +def test_setFrequency(uut, mockDevice): + checkNumericalParameter([0.0, 100.0, 100000.0, 60000000.0], uut.setFrequency, mockDevice.getFrequency) def test_setInvalidFrequency(uut, mockDevice): checkInvalidNumericalParameter([-10.0, 60000000.1, None], uut.setFrequency, mockDevice.getFrequency) diff --git a/lab_control/test/mock_jds6600_device.py b/lab_control/test/mock_jds6600_device.py index 426b8ac..6db4f4c 100644 --- a/lab_control/test/mock_jds6600_device.py +++ b/lab_control/test/mock_jds6600_device.py @@ -52,9 +52,9 @@ class MockJDS6600Device(): # channel frequency elif function == 23 or function == 24: - # TODO implement correct behaviour + # Actual device takes a second argument for scaling, here we ignore it and always use 0 (Hz) ch = function - 23 - frequency = float(args[0]) + frequency = float(args[0]) / 100.0 self._channels[ch].frequency = frequency # channel amplitude |