# HG changeset patch # User Anton Shestakov # Date 1591441969 -28800 # Node ID f9099e210c57086247d9ac1f6dfc112bedbbb04b # Parent 1ca0d5cae9bc5d73985101c1dcd2b61d5c234ba9 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 diff -r 1ca0d5cae9bc -r f9099e210c57 tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t Sat Jun 06 19:19:27 2020 +0800 +++ b/tests/test-check-pyflakes.t Sat Jun 06 19:12:49 2020 +0800 @@ -8,7 +8,7 @@ $ cat > test.py < print(undefinedname) > EOF - $ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" + $ $PYTHON -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" test.py:1: undefined name 'undefinedname' $ cd "`dirname "$TESTDIR"`"