tests/hghave.py
changeset 40326 fed697fa1734
parent 40263 8cf459d8b111
child 40453 1bf3e6041e2c
--- a/tests/hghave.py	Tue Oct 16 15:36:19 2018 +0200
+++ b/tests/hghave.py	Tue Oct 09 08:50:13 2018 -0700
@@ -787,6 +787,16 @@
 def has_repofncache():
     return 'fncache' in getrepofeatures()
 
+@check('sqlite', 'sqlite3 module is available')
+def has_sqlite():
+    try:
+        import sqlite3
+        sqlite3.sqlite_version
+    except ImportError:
+        return False
+
+    return matchoutput('sqlite3 -version', b'^3\.\d+')
+
 @check('vcr', 'vcr http mocking library')
 def has_vcr():
     try: