aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-03-02 15:36:07 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-03-02 15:37:46 +0100
commit159940076eb29ac272e18c5a937264325e77a2a7 (patch)
treee6494617ac4c3cc7d1c307c066cefebaad426023
parent7da48116d03b5734818d1ae751f5cf7278dcc372 (diff)
downloadlibgpiod-159940076eb29ac272e18c5a937264325e77a2a7.tar.gz
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 <bartosz.golaszewski@linaro.org>
-rw-r--r--bindings/python/tests/tests_module.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindings/python/tests/tests_module.py b/bindings/python/tests/tests_module.py
index d4c90e2c..cfb4b346 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)