tests/hghave.py
changeset 43470 32ac4d0b4102
parent 43455 6792da448437
child 43699 21e05aabef8c
--- a/tests/hghave.py	Wed Nov 06 15:13:23 2019 -0500
+++ b/tests/hghave.py	Wed Nov 06 14:09:36 2019 -0500
@@ -1000,3 +1000,11 @@
     version = matchoutput(blackcmd, version_regex)
     sv = distutils.version.StrictVersion
     return version and sv(_strpath(version.group(1))) >= sv('19.10b0')
+
+
+@check('pytype', 'the pytype type checker')
+def has_pytype():
+    pytypecmd = 'pytype --version'
+    version = matchoutput(pytypecmd, b'[0-9a-b.]+')
+    sv = distutils.version.StrictVersion
+    return version and sv(_strpath(version.group(0))) >= sv('2019.10.17')