Commit 89384ce1 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

tests: use hghaveaddon.py to check for flake8

Since we need flake8 to be a python module, we shouldn't use a shell script
with `which` to check for its presence anymore.
parent f354de498737
......@@ -12,3 +12,14 @@ def docgraph():
except ImportError:
return False
return True
@hghave.check("flake8", "Flake8 python linter")
def has_flake8():
try:
import flake8
flake8.__version__
except ImportError:
return False
else:
return True
#require test-repo
$ checkflake8() {
> if ! (which flake8 > /dev/null); then
> echo skipped: missing tool: flake8;
> exit 80;
> fi;
> };
$ checkflake8
#require test-repo flake8
Copied from Mercurial core (60ee2593a270)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment