Patchwork D8617: tests: consistently use pyflakes as a Python module

login
register
mail settings
Submitter phabricator
Date June 6, 2020, 11:31 a.m.
Message ID <differential-rev-PHID-DREV-eaxnqt33itj43zdi6y5z-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46479/
State Superseded
Headers show

Comments

phabricator - June 6, 2020, 11:31 a.m.
av6 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8617

AFFECTED FILES
  tests/test-check-pyflakes.t

CHANGE DETAILS




To: av6, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t
+++ b/tests/test-check-pyflakes.t
@@ -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"`"