From: Daniele Varrazzo Date: Mon, 15 Aug 2022 11:46:46 +0000 (+0200) Subject: test: allow to use the != operator in make.libpq X-Git-Tag: 3.1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b03031c8b37072119567f6e1659720bb0b76539;p=thirdparty%2Fpsycopg.git test: allow to use the != operator in make.libpq --- diff --git a/tests/utils.py b/tests/utils.py index d3c1ba76d..47c796629 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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: