--- a/tests/hghave.py Thu Feb 22 18:28:01 2024 +0100
+++ b/tests/hghave.py Fri Feb 23 15:10:44 2024 +0100
@@ -67,7 +67,7 @@
return f
for v in vers:
- v = str(v)
+ assert isinstance(v, str)
f = funcv(v)
checks['%s%s' % (name, v.replace('.', ''))] = (f, desc % v)
return func
@@ -356,7 +356,7 @@
@checkvers(
- "hg", "Mercurial >= %s", list([(1.0 * x) / 10 for x in range(9, 99)])
+ "hg", "Mercurial >= %s", ['%d.%d' % divmod(x, 10) for x in range(9, 99)]
)
def has_hg_range(v):
major, minor = v.split('.')[0:2]
@@ -435,7 +435,7 @@
)
-@checkvers("git", "git client (with ext::sh support) version >= %s", (1.9,))
+@checkvers("git", "git client (with ext::sh support) version >= %s", ('1.9',))
def has_git_range(v):
major, minor = v.split('.')[0:2]
return getgitversion() >= (int(major), int(minor))
@@ -459,7 +459,7 @@
return (int(m.group(1)), int(m.group(2)))
-@checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5))
+@checkvers("svn", "subversion client and admin tools >= %s", ('1.3', '1.5'))
def has_svn_range(v):
major, minor = v.split('.')[0:2]
return getsvnversion() >= (int(major), int(minor))
@@ -662,7 +662,7 @@
return (0, 0)
-@checkvers("pygments", "Pygments version >= %s", (2.5, 2.11, 2.14))
+@checkvers("pygments", "Pygments version >= %s", ('2.5', '2.11', '2.14'))
def has_pygments_range(v):
major, minor = v.split('.')[0:2]
return getpygmentsversion() >= (int(major), int(minor))
@@ -868,7 +868,11 @@
# Add "py36", "py37", ... as possible feature checks. Note that there's no
# punctuation here.
-@checkvers("py", "Python >= %s", (3.6, 3.7, 3.8, 3.9, 3.10, 3.11))
+@checkvers(
+ "py",
+ "Python >= %s",
+ ('3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'),
+)
def has_python_range(v):
major, minor = v.split('.')[0:2]
py_major, py_minor = sys.version_info.major, sys.version_info.minor