tests/hghave.py
changeset 48550 21c0ae0693bc
parent 48521 f447b90a4b11
child 48773 6cfa30681a1d
--- a/tests/hghave.py	Mon Jan 03 01:09:56 2022 +0100
+++ b/tests/hghave.py	Sun Jan 09 13:35:30 2022 +0100
@@ -663,6 +663,22 @@
     return (major, minor) >= (2, 5)
 
 
+@check("pygments211", "Pygments version >= 2.11")
+def pygments211():
+    try:
+        import pygments
+
+        v = pygments.__version__
+    except ImportError:
+        return False
+
+    parts = v.split(".")
+    major = int(parts[0])
+    minor = int(parts[1])
+
+    return (major, minor) >= (2, 11)
+
+
 @check("outer-repo", "outer repo")
 def has_outer_repo():
     # failing for other reasons than 'no repo' imply that there is a repo