releasenotes: add import check for fuzzywuzzy
authorRishabh Madan <rishabhmadan96@gmail.com>
Sat, 29 Jul 2017 14:06:26 +0530
changeset 33723 4d1e79945c2e
parent 33722 1fa6023240f4
child 33724 3748098d072a
releasenotes: add import check for fuzzywuzzy This patch adds the has_fuzzywuzzy for import check of external dependency fuzzywuzzy.
tests/hghave.py
--- a/tests/hghave.py	Tue Jul 18 00:57:11 2017 -0400
+++ b/tests/hghave.py	Sat Jul 29 14:06:26 2017 +0530
@@ -652,3 +652,12 @@
 @check("fsmonitor", "running tests with fsmonitor")
 def has_fsmonitor():
     return 'HGFSMONITOR_TESTS' in os.environ
+
+@check("fuzzywuzzy", "Fuzzy string matching library")
+def has_fuzzywuzzy():
+    try:
+        import fuzzywuzzy
+        fuzzywuzzy.__version__
+        return True
+    except ImportError:
+        return False