]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: allow to use the != operator in make.libpq
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 15 Aug 2022 11:46:46 +0000 (13:46 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 15 Aug 2022 13:41:04 +0000 (15:41 +0200)
tests/utils.py

index d3c1ba76d3232cd8f7a29b245194e9b5c94e582a..47c7966295105898bb17f3c20067f67afb47b82d 100644 (file)
@@ -67,7 +67,7 @@ class VersionCheck:
         m = re.match(
             r"""(?ix)
             ^\s* (skip|only)?
-            \s* (>=|<=|>|<)?
+            \s* (==|!=|>=|<=|>|<)?
             \s* (?:(\d+)(?:\.(\d+)(?:\.(\d+))?)?)?
             \s* $
             """,
@@ -111,7 +111,7 @@ class VersionCheck:
 
         return msg
 
-    _OP_NAMES = {">=": "ge", "<=": "le", ">": "gt", "<": "lt", "==": "eq"}
+    _OP_NAMES = {">=": "ge", "<=": "le", ">": "gt", "<": "lt", "==": "eq", "!=": "ne"}
 
     def _match_version(self, got_tuple: Tuple[int, ...]) -> bool:
         if not self.version_tuple: