summaryrefslogtreecommitdiffstats
path: root/lab_control/test
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-06-05 20:02:18 +0200
committerEddy Pedroni <eddy@0xf7.com>2022-06-05 20:02:18 +0200
commitabb39ea6167aa1e6c4cbc3695a6d0a5440022ad6 (patch)
tree7c1d216b02128c40f247c6339cf64e45df958830 /lab_control/test
parent6db2d5c1ea2c50c479d4ff7b38359529bc12bb83 (diff)
Improved JDS6600 testsHEADmaster
Diffstat (limited to 'lab_control/test')
-rw-r--r--lab_control/test/jds6600_unittest.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lab_control/test/jds6600_unittest.py b/lab_control/test/jds6600_unittest.py
index 476514b..5b34fce 100644
--- a/lab_control/test/jds6600_unittest.py
+++ b/lab_control/test/jds6600_unittest.py
@@ -31,13 +31,14 @@ def checkInvalidNumericalParameter(testValues, writeValue, valueInMock):
writeValue(ch, value)
def test_serialPortConfiguration(mockConnection):
- with pytest.raises(AssertionError):
- mockConnection.checkConfiguration()
+ assert mockConnection.config == {}
uut = JDS6600("", mockConnection)
- mockConnection.checkConfiguration()
-
- uut.closePort()
+
+ assert mockConnection.config.get("baudrate") == 115200
+ assert mockConnection.config.get("bytesize") == 8
+ assert mockConnection.config.get("stopbits") == 1
+ assert mockConnection.config.get("parity") == "N"
def test_channelOnAndOff(uut, mockDevice):
for ch in JDS6600.AVAILABLE_CHANNELS: