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

login
register
mail settings
Submitter phabricator
Date June 13, 2020, 9:07 a.m.
Message ID <differential-rev-PHID-DREV-alkhbtlw2fjyuhojyrgh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46499/
State Superseded
Headers show

Comments

phabricator - June 13, 2020, 9:07 a.m.
marmoute 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.
  
  This is a graft of a similar fix that ended up on default.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  tests/test-check-pyflakes.t

CHANGE DETAILS




To: marmoute, #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"`"