2017-01-18 23:00:54 +03:00
|
|
|
#require test-repo pyflakes
|
2016-10-19 00:23:18 +03:00
|
|
|
|
|
|
|
$ . $TESTDIR/require-core-hg.sh tests/filterpyflakes.py
|
|
|
|
|
|
|
|
This file is backported from mercurial/tests/test-check-pyflakes.t.
|
|
|
|
It differs slightly to fix paths.
|
|
|
|
|
2017-06-16 20:57:52 +03:00
|
|
|
$ . "$TESTDIR/helper-testrepo.sh"
|
2016-10-19 00:23:18 +03:00
|
|
|
|
|
|
|
run pyflakes on all tracked files ending in .py or without a file ending
|
|
|
|
(skipping binary file random-seed)
|
|
|
|
|
2016-10-20 17:44:29 +03:00
|
|
|
$ hg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1"
|
|
|
|
$ if [ -n "$LINTFILES" ]; then
|
|
|
|
> printf "$LINTFILES" > "$TESTTMP/files2"
|
|
|
|
> join "$TESTTMP/files1" "$TESTTMP/files2"
|
|
|
|
> else
|
|
|
|
> cat "$TESTTMP/files1"
|
|
|
|
> fi \
|
2016-10-19 00:23:18 +03:00
|
|
|
> | xargs pyflakes 2>/dev/null | "$RUNTESTDIR/filterpyflakes.py"
|
|
|
|
|