From 3473ef12e857cb8fb1a5072b01fd43ba0ba7d3f0 Mon Sep 17 00:00:00 2001 From: vegano1 Date: Wed, 18 Sep 2024 15:23:45 -0400 Subject: [PATCH] update serial number parsing format --- api/src/opentrons/drivers/absorbance_reader/async_byonoy.py | 2 +- api/tests/opentrons/drivers/absorbance_reader/test_driver.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/opentrons/drivers/absorbance_reader/async_byonoy.py b/api/src/opentrons/drivers/absorbance_reader/async_byonoy.py index 50f688206d0..43342095195 100644 --- a/api/src/opentrons/drivers/absorbance_reader/async_byonoy.py +++ b/api/src/opentrons/drivers/absorbance_reader/async_byonoy.py @@ -24,7 +24,7 @@ SN_PARSER = re.compile(r'ATTRS{serial}=="(?P.+?)"') VERSION_PARSER = re.compile(r"Absorbance (?PV\d+\.\d+\.\d+)") -SERIAL_PARSER = re.compile(r"SN: (?PBYO[A-Z]{3}[0-9]{5})") +SERIAL_PARSER = re.compile(r"(?PBYO[A-Z]{3}[0-9]{5})") class AsyncByonoy: diff --git a/api/tests/opentrons/drivers/absorbance_reader/test_driver.py b/api/tests/opentrons/drivers/absorbance_reader/test_driver.py index 5fe71d2763c..a9c34fd500c 100644 --- a/api/tests/opentrons/drivers/absorbance_reader/test_driver.py +++ b/api/tests/opentrons/drivers/absorbance_reader/test_driver.py @@ -79,8 +79,8 @@ async def test_driver_get_device_info( ) -> None: DEVICE_INFO = MagicMock(AbsorbanceHidInterface.DeviceInfo) - DEVICE_INFO.ref_no = "" - DEVICE_INFO.sn = "SN: BYOMAA00013 REF: DE MAA 001" + DEVICE_INFO.ref_no = "DE MAA 001" + DEVICE_INFO.sn = "BYOMAA00013" DEVICE_INFO.version = "Absorbance V1.0.2 2024-04-18" mock_interface.byonoy_get_device_information.return_value = (