##// END OF EJS Templates
tests: consistently use pyflakes as a Python module...
tests: consistently use pyflakes as a Python module We check availability of pyflakes as a module, and also running it for real as a module. Only fair to test filterpyflakes.py working correctly when using pyflakes as a module too. This is a graft of a similar fix that ended up on default. Differential Revision: https://phab.mercurial-scm.org/D8629

File last commit:

r45485:f9099e21 stable
r45485:f9099e21 stable
Show More
test-check-pyflakes.t
26 lines | 913 B | text/troff | Tads3Lexer
/ tests / test-check-pyflakes.t
timeless
tests: mark test-check-pyflakes.t as requiring hg1.0+...
r29138 #require test-repo pyflakes hg10
Matt Mackall
tests: add repository check for pyflakes test...
r21208
timeless
tests: silence test-repo obsolete warning...
r29219 $ . "$TESTDIR/helpers-testrepo.sh"
Simon Heimberg
tests: run pyflakes on files from manifest which could be python files...
r19377
run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)
Matt Mackall
tests: add repository check for pyflakes test...
r21208
Augie Fackler
filterpyflakes: move self-test into test file...
r33367 $ cat > test.py <<EOF
> print(undefinedname)
> EOF
av6
tests: consistently use pyflakes as a Python module...
r45485 $ $PYTHON -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
Augie Fackler
filterpyflakes: move self-test into test file...
r33367 test.py:1: undefined name 'undefinedname'
Jun Wu
test-check-pyflakes: do not leave test.py in the repo...
r33418 $ cd "`dirname "$TESTDIR"`"
Augie Fackler
filterpyflakes: move self-test into test file...
r33367
Yuya Nishihara
tests: alias syshg and syshgenv so they can be switched conditionally
r33199 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
Adam Simpkins
tests: use the system hg for examining the local repository...
r33116 > -X hgext/fsmonitor/pywatchman \
Augie Fackler
tests: exclude python-zstandard from pyflakes analysis
r30894 > -X mercurial/pycompat.py -X contrib/python-zstandard \
av6
tests: skip pyflakes for mercurial/thirdparty/...
r45484 > -X mercurial/thirdparty \
Pulkit Goyal
pycompat: make pycompat demandimport friendly...
r29584 > 2>/dev/null \
Manuel Jacob
tests: use pyflakes module instead of pyflakes executable...
r44951 > | xargs $PYTHON -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
Gregory Szorc
tests: allow xrange warning from perf.py...
r43338 contrib/perf.py:*: undefined name 'xrange' (glob) (?)
Gregory Szorc
hgweb: use importlib.reload() if available...
r43339 mercurial/hgweb/server.py:*: undefined name 'reload' (glob) (?)
Gregory Szorc
tests: allow warning about file...
r43379 mercurial/util.py:*: undefined name 'file' (glob) (?)
Augie Fackler
encoding: add comment-based type hints for pytype...
r43802 mercurial/encoding.py:*: undefined name 'localstr' (glob) (?)
Matt Mackall
tests: fix pyflakes test whitespace breakage
r22053