tests/hghave.py
changeset 44483 2e464925f662
parent 44465 75ada5fe9b62
child 44498 aa0e1341457b
--- a/tests/hghave.py	Sat Mar 07 18:00:53 2020 -0500
+++ b/tests/hghave.py	Mon Mar 09 12:53:21 2020 -0700
@@ -381,6 +381,17 @@
     return (int(m.group(1)), int(m.group(2)))
 
 
+@check("pygit2", "pygit2 Python library")
+def has_git():
+    try:
+        import pygit2
+
+        pygit2.Oid  # silence unused import
+        return True
+    except ImportError:
+        return False
+
+
 # https://github.com/git-lfs/lfs-test-server
 @check("lfs-test-server", "git-lfs test server")
 def has_lfsserver():