File: test-check-pyflakes.t

package info (click to toggle)
hg-git 0.8.12-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 876 kB
  • sloc: python: 6,248; sh: 102; makefile: 32
file content (19 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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