From 6431b8b3380d77eb8a59f8b4ff5fcc4f6fc2f7d0 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Thu, 26 May 2022 16:43:15 +0200 Subject: Improved frequency measurement test --- lab_control/test/mock_sds1000xe_server.py | 2 +- lab_control/test/sds1000xe_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lab_control') diff --git a/lab_control/test/mock_sds1000xe_server.py b/lab_control/test/mock_sds1000xe_server.py index f5a2b1a..1b72146 100644 --- a/lab_control/test/mock_sds1000xe_server.py +++ b/lab_control/test/mock_sds1000xe_server.py @@ -44,7 +44,7 @@ class MockSDS1000XEServer: self._clientSocket.close() def _handleRequest(self, request: str) -> str: - m = re.search(r"C(?P\d):(?P\w{4})\?\s(?P\w+)", request) + m = re.search(r"C(?P\d):(?P\w+)\?\s(?P\w+)", request) if not m: return None diff --git a/lab_control/test/sds1000xe_test.py b/lab_control/test/sds1000xe_test.py index ea48c87..0112c9f 100644 --- a/lab_control/test/sds1000xe_test.py +++ b/lab_control/test/sds1000xe_test.py @@ -34,7 +34,7 @@ def test_RMSMeasurement(uut, mockServer): checkFloatMeasurement(testCases, mockServer.setRMS, uut.measureRMS) def test_FrequencyMeasurement(uut, mockServer): - testCases = [(1, 16.23987), (2, 0.0), (3, -0.0164), (4, 10.1)] + testCases = [(1, 16.23987), (2, 0.0), (3, -0.0164), (4, 93489.15)] checkFloatMeasurement(testCases, mockServer.setFrequency, uut.measureFrequency) def test_invalidChannel(uut, mockServer): -- cgit v1.2.3