##// END OF EJS Templates
tests: actually restore the original environment before running syshg...
tests: actually restore the original environment before running syshg Since os.environ may be overridden in run-tests.py, several important variables such as PATH weren't restored. I don't like the idea of using the system hg *by default* because the executable and the configs are out of our control. But I don't mind as long as the tests pass.

File last commit:

r33116:6c113a7d default
r33198:cf826b9e default
Show More
test-check-pyflakes.t
15 lines | 506 B | text/troff | Tads3Lexer
/ tests / test-check-pyflakes.t
#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)
$ syshg locate 'set:**.py or grep("^#!.*python")' \
> -X hgext/fsmonitor/pywatchman \
> -X mercurial/pycompat.py -X contrib/python-zstandard \
> 2>/dev/null \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
tests/filterpyflakes.py:41: undefined name 'undefinedname'