summaryrefslogtreecommitdiffstats
path: root/lab_control/test/sds1000xe_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'lab_control/test/sds1000xe_test.py')
-rw-r--r--lab_control/test/sds1000xe_test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lab_control/test/sds1000xe_test.py b/lab_control/test/sds1000xe_test.py
index 6f3de80..3774d52 100644
--- a/lab_control/test/sds1000xe_test.py
+++ b/lab_control/test/sds1000xe_test.py
@@ -1,4 +1,5 @@
import pytest
+import time
from lab_control.sds1000xe import SDS1000XE
from lab_control.test.mock_sds1000xe_device import MockSDS1000XEDevice
@@ -48,3 +49,16 @@ def test_invalidChannel(uut, mockDevice):
with pytest.raises(AssertionError):
m(t)
+def test_setVoltsPerDivision(uut, mockDevice):
+ testValues = [5e-3, 50e-3, 1e0, 5e0, 10e0, 100e0]
+
+ for channel in SDS1000XE.AVAILABLE_CHANNELS:
+ assert mockDevice.getVoltsPerDivision(channel) is None
+
+ for value in testValues:
+ uut.setVoltsPerDivision(channel, value)
+
+ time.sleep(0.1) # Allow time for the mock to receive and process the request
+
+ assert mockDevice.getVoltsPerDivision(channel) == value
+