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

Rishabh Madan rishabhmadan96 at gmail.com
Sun Jul 9 21:45:24 UTC 2017


# HG changeset patch
# User Rishabh Madan <rishabhmadan96 at gmail.com>
# Date 1499635502 -7200
#      Sun Jul 09 23:25:02 2017 +0200
# Node ID 43c97ccdfd39cfa447100b54e923d1d3d753476b
# Parent  5f22d3d43d36d46cea98c86b2a49eee2d323fd9e
releasenotes: add import check for fuzzywuzzy

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

diff -r 5f22d3d43d36 -r 43c97ccdfd39 tests/hghave.py
--- a/tests/hghave.py	Sun Jul 09 19:04:10 2017 +0200
+++ b/tests/hghave.py	Sun Jul 09 23:25:02 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.__version__
+        return True
+    except ImportError:
+        return False


More information about the Mercurial-devel mailing list