From: Bartosz Golaszewski Date: Thu, 2 Mar 2023 14:36:07 +0000 (+0100) Subject: bindings: python: tests: fix the version parsing regex X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=159940076eb29ac272e18c5a937264325e77a2a7;p=qemu-gpiodev%2Flibgpiod.git 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 --- 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)