sapling/tests/test-check-pyflakes.t
Saurabh Singh cc2a9a760d hg: remove facebook-hg-rpms related code
Summary:
Don't think this is required or used anymore and reveals information
about the structure of our project if we open source our mercurial.

Reviewed By: quark-zju

Differential Revision: D7128203

fbshipit-source-id: 4cdfa008631d08321a4d5a1c8f18cef429c35077
2018-04-13 21:51:20 -07:00

26 lines
746 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)
$ PYFLAKES=${HGTEST_PYFLAKES_PATH:-pyflakes}
$ 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/packaging \
> 2>/dev/null \
> | xargs "$PYFLAKES" 2>/dev/null | "$TESTDIR/filterpyflakes.py"
setup.py:*: '*svn_swig_wrapper' imported but unused (glob)