# HG changeset patch # User Rishabh Madan # Date 2017-07-29 08:36:26 # Node ID 4d1e79945c2e558434c03f808094d8637109d6ec # Parent 1fa6023240f489e4382202a31e3d49eaaf6902d7 releasenotes: add import check for fuzzywuzzy This patch adds the has_fuzzywuzzy for import check of external dependency fuzzywuzzy. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -652,3 +652,12 @@ def has_virtualenv(): @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