Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
48578:28f0092ec89f | 48579:21c0ae0693bc |
---|---|
659 parts = v.split(".") | 659 parts = v.split(".") |
660 major = int(parts[0]) | 660 major = int(parts[0]) |
661 minor = int(parts[1]) | 661 minor = int(parts[1]) |
662 | 662 |
663 return (major, minor) >= (2, 5) | 663 return (major, minor) >= (2, 5) |
664 | |
665 | |
666 @check("pygments211", "Pygments version >= 2.11") | |
667 def pygments211(): | |
668 try: | |
669 import pygments | |
670 | |
671 v = pygments.__version__ | |
672 except ImportError: | |
673 return False | |
674 | |
675 parts = v.split(".") | |
676 major = int(parts[0]) | |
677 minor = int(parts[1]) | |
678 | |
679 return (major, minor) >= (2, 11) | |
664 | 680 |
665 | 681 |
666 @check("outer-repo", "outer repo") | 682 @check("outer-repo", "outer repo") |
667 def has_outer_repo(): | 683 def has_outer_repo(): |
668 # failing for other reasons than 'no repo' imply that there is a repo | 684 # failing for other reasons than 'no repo' imply that there is a repo |