sapling/tests/test-check-pyflakes.t
Durham Goode f9bcc09f4a hg: fix check pyflakes
Summary:
This test wasn't running because it had a hg10 check. Let's drop that
and fix the one failure.

Differential Revision: D6798754

fbshipit-source-id: 9d1f1f8b58ff14cba8228f9dc4c83ce21cab6c48
2018-04-13 21:50:56 -07:00

26 lines
722 B
Perl

#require test-repo pyflakes
$ . "$TESTDIR/helpers-testrepo.sh"
run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)
$ cat > test.py <<EOF
> print(undefinedname)
> EOF
$ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
test.py:1: undefined name 'undefinedname'
$ cd "`dirname "$TESTDIR"`"
$ testrepohg locate '**.py' -I '.' \
> -X hgext/fsmonitor/pywatchman \
> -X mercurial/pycompat.py -X contrib/python-zstandard \
> -X hg-git \
> -X fb/facebook-hg-rpms \
> -X fb/packaging \
> 2>/dev/null \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
setup.py:*: '*svn_swig_wrapper' imported but unused (glob)