tests/test-check-pyflakes.t
author Augie Fackler <augie@google.com>
Thu, 10 Nov 2016 16:49:42 -0500
changeset 30421 21772a6a7861
parent 30394 046a7e828ea6
child 30435 b86a448a2965
permissions -rw-r--r--
filterpyflakes: dramatically simplify the entire thing by blacklisting We've only got one kind of pyflakes failure left in our codebase, so it's time to switch over to a blacklist-based checking scheme. I've left in the filtering of two undefined names for now out of paranoia, but those can probably go too.

#require test-repo pyflakes hg10

  $ . "$TESTDIR/helpers-testrepo.sh"
  $ cd "`dirname "$TESTDIR"`"

run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)

  $ hg locate 'set:**.py or grep("^#!.*python")' \
  > -X mercurial/pycompat.py \
  > 2>/dev/null \
  > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
  tests/filterpyflakes.py:39: undefined name 'undefinedname'