[PATCH 1 of 2] releasenotes: add import check for fuzzywuzzy

Rishabh Madan rishabhmadan96 at gmail.com
Sat Jul 29 05:54:14 EDT 2017


# HG changeset patch
# User Rishabh Madan <rishabhmadan96 at gmail.com>
# Date 1501317386 -19800
#      Sat Jul 29 14:06:26 2017 +0530
# Node ID 1d79b04c402f3f431ca052b677b1021ddd93a10e
# Parent  9a944e908ecf9ac3aabf30a24406513370eeebe7
releasenotes: add import check for fuzzywuzzy

This patch adds the has_fuzzywuzzy for import check of external dependency
fuzzywuzzy.

diff -r 9a944e908ecf -r 1d79b04c402f tests/hghave.py
--- a/tests/hghave.py	Tue Jul 18 23:04:08 2017 +0530
+++ 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
+
+ at check("fuzzywuzzy", "Fuzzy string matching library")
+def has_fuzzywuzzy():
+    try:
+        import fuzzywuzzy
+        fuzzywuzzy.__version__
+        return True
+    except ImportError:
+        return False


More information about the Mercurial-devel mailing list