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

Rishabh Madan rishabhmadan96 at gmail.com
Thu Jun 29 18:57:25 EDT 2017


# HG changeset patch
# User Rishabh Madan <rishabhmadan96 at gmail.com>
# Date 1498771803 -7200
#      Thu Jun 29 23:30:03 2017 +0200
# Node ID 9f7c675413ffce1497c7db3ff1495e4050b151d6
# Parent  eb4c49f55f1f0d7719f514c16bec54515eb54f62
releasenotes: add import check for fuzzywuzzy

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

diff -r eb4c49f55f1f -r 9f7c675413ff tests/hghave.py
--- a/tests/hghave.py	Sun Jun 25 22:30:14 2017 -0700
+++ b/tests/hghave.py	Thu Jun 29 23:30:03 2017 +0200
@@ -658,3 +658,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.fuzz
+        return True
+    except ImportError:
+        return False


More information about the Mercurial-devel mailing list