tests: consistently use pyflakes as a Python module
authorAnton Shestakov <av6@dwimlabs.net>
Sat, 06 Jun 2020 19:12:49 +0800
changeset 44937 f4361aed565d
parent 44936 aa568b6c6a10
child 44938 3d409f4ff46b
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. Differential Revision: https://phab.mercurial-scm.org/D8617
tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t	Wed Feb 26 00:31:23 2020 +0100
+++ b/tests/test-check-pyflakes.t	Sat Jun 06 19:12:49 2020 +0800
@@ -8,7 +8,7 @@
   $ cat > test.py <<EOF
   > 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"`"