Mercurial > hg > mercurial-source
diff tests/hghave.py @ 34480:4d1e79945c2e
releasenotes: add import check for fuzzywuzzy
This patch adds the has_fuzzywuzzy for import check of external dependency
fuzzywuzzy.
author | Rishabh Madan <rishabhmadan96@gmail.com> |
---|---|
date | Sat, 29 Jul 2017 14:06:26 +0530 |
parents | c384ac3ea147 |
children | dbf83230e8be |
line wrap: on
line diff
--- a/tests/hghave.py +++ b/tests/hghave.py @@ -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