Mercurial > public > mercurial-scm > hg-stable
diff tests/hghave.py @ 48579:21c0ae0693bc
tests: support pygments 2.11 (issue6628)
Differential Revision: https://phab.mercurial-scm.org/D11970
author | C?dric Krier <ced@b2ck.com> |
---|---|
date | Sun, 09 Jan 2022 13:35:30 +0100 |
parents | f447b90a4b11 |
children | 6cfa30681a1d |
line wrap: on
line diff
--- 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