##// END OF EJS Templates
tests: consistently use pyflakes as a Python module...
av6 -
r45485:f9099e21 stable
parent child Browse files
Show More
@@ -1,26 +1,26 b''
1 #require test-repo pyflakes hg10
1 #require test-repo pyflakes hg10
2
2
3 $ . "$TESTDIR/helpers-testrepo.sh"
3 $ . "$TESTDIR/helpers-testrepo.sh"
4
4
5 run pyflakes on all tracked files ending in .py or without a file ending
5 run pyflakes on all tracked files ending in .py or without a file ending
6 (skipping binary file random-seed)
6 (skipping binary file random-seed)
7
7
8 $ cat > test.py <<EOF
8 $ cat > test.py <<EOF
9 > print(undefinedname)
9 > print(undefinedname)
10 > EOF
10 > EOF
11 $ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
11 $ $PYTHON -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
12 test.py:1: undefined name 'undefinedname'
12 test.py:1: undefined name 'undefinedname'
13
13
14 $ cd "`dirname "$TESTDIR"`"
14 $ cd "`dirname "$TESTDIR"`"
15
15
16 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
16 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
17 > -X hgext/fsmonitor/pywatchman \
17 > -X hgext/fsmonitor/pywatchman \
18 > -X mercurial/pycompat.py -X contrib/python-zstandard \
18 > -X mercurial/pycompat.py -X contrib/python-zstandard \
19 > -X mercurial/thirdparty \
19 > -X mercurial/thirdparty \
20 > 2>/dev/null \
20 > 2>/dev/null \
21 > | xargs $PYTHON -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
21 > | xargs $PYTHON -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
22 contrib/perf.py:*: undefined name 'xrange' (glob) (?)
22 contrib/perf.py:*: undefined name 'xrange' (glob) (?)
23 mercurial/hgweb/server.py:*: undefined name 'reload' (glob) (?)
23 mercurial/hgweb/server.py:*: undefined name 'reload' (glob) (?)
24 mercurial/util.py:*: undefined name 'file' (glob) (?)
24 mercurial/util.py:*: undefined name 'file' (glob) (?)
25 mercurial/encoding.py:*: undefined name 'localstr' (glob) (?)
25 mercurial/encoding.py:*: undefined name 'localstr' (glob) (?)
26
26
General Comments 0
You need to be logged in to leave comments. Login now