tests/hghave.py
branchstable
changeset 49951 42baf12efd21
parent 49833 a2356e15200a
child 49952 5df6d4f06a8f
--- a/tests/hghave.py	Wed Jan 25 18:54:17 2023 +0400
+++ b/tests/hghave.py	Wed Jan 25 19:25:42 2023 +0400
@@ -693,6 +693,22 @@
     return (major, minor) >= (2, 11)
 
 
+@check("pygments214", "Pygments version >= 2.14")
+def pygments214():
+    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, 14)
+
+
 @check("outer-repo", "outer repo")
 def has_outer_repo():
     # failing for other reasons than 'no repo' imply that there is a repo