##// END OF EJS Templates
filterpyflakes: move self-test into test file...
Augie Fackler -
r33367:6029939f default
parent child Browse files
Show More
@@ -35,7 +35,3 for line in sys.stdin:
35 for line in lines:
35 for line in lines:
36 sys.stdout.write(line)
36 sys.stdout.write(line)
37 print()
37 print()
38
39 # self test of "undefined name" detection
40 if False:
41 print(undefinedname)
@@ -6,10 +6,16
6 run pyflakes on all tracked files ending in .py or without a file ending
6 run pyflakes on all tracked files ending in .py or without a file ending
7 (skipping binary file random-seed)
7 (skipping binary file random-seed)
8
8
9 $ cat > test.py <<EOF
10 > print(undefinedname)
11 > EOF
12 $ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
13 test.py:1: undefined name 'undefinedname'
14
15
9 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
16 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
10 > -X hgext/fsmonitor/pywatchman \
17 > -X hgext/fsmonitor/pywatchman \
11 > -X mercurial/pycompat.py -X contrib/python-zstandard \
18 > -X mercurial/pycompat.py -X contrib/python-zstandard \
12 > 2>/dev/null \
19 > 2>/dev/null \
13 > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
20 > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
14 tests/filterpyflakes.py:41: undefined name 'undefinedname'
15
21
General Comments 0
You need to be logged in to leave comments. Login now