From 159940076eb29ac272e18c5a937264325e77a2a7 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 2 Mar 2023 15:36:07 +0100 Subject: [PATCH] bindings: python: tests: fix the version parsing regex Two-digit versions are not correctly parsed as the last "segment" is not optional as it should. Signed-off-by: Bartosz Golaszewski --- bindings/python/tests/tests_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/tests/tests_module.py b/bindings/python/tests/tests_module.py index d4c90e2..cfb4b34 100644 --- a/bindings/python/tests/tests_module.py +++ b/bindings/python/tests/tests_module.py @@ -51,7 +51,7 @@ class IsGPIOChip(TestCase): class VersionString(TestCase): - VERSION_PATTERN = "^[0-9][1-9]?\\.[0-9][1-9]?(\\.[0-9]?|\\-devel|\\-rc[0-9])$" + VERSION_PATTERN = "^[0-9][1-9]?\\.[0-9][1-9]?((\\.[0-9])?|\\-devel|\\-rc[0-9])$" def test_api_version_string(self): self.assertRegex(gpiod.api_version, VersionString.VERSION_PATTERN) -- 2.30.2