From abb39ea6167aa1e6c4cbc3695a6d0a5440022ad6 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sun, 5 Jun 2022 20:02:18 +0200 Subject: Improved JDS6600 tests --- lab_control/test/jds6600_unittest.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lab_control/test') 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: -- cgit v1.2.3