Mercurial > hg-git
view tests/test-check-pyflakes.t @ 1119:e01f59918160
tests: add pyflakes check to the test suite
This is a large patch since we're copying over Mercurial's
helpers-testrepo.sh and a slightly modified version of pyflakes.t
author | Sean Farley <sean@farley.io> |
---|---|
date | Tue, 28 Nov 2017 22:49:58 -0800 |
parents | |
children |
line wrap: on
line source
#require test-repo pyflakes hg10 $ . "$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 test.py:1: undefined name 'undefinedname' [1] $ cd "`dirname "$TESTDIR"`" $ testrepohg locate 'set:**.py or grep("^#!.*python")' \ > -X tests/ \ > 2>/dev/null \ > | xargs pyflakes 2>/dev/null