Patchwork [3,of,3] tests: run pyflakes on files from manifest which could be python files

login
register
mail settings
Submitter Simon Heimberg
Date June 26, 2013, 9:35 p.m.
Message ID <dac1a6dc604928b5fc4a.1372282501@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1754/
State Superseded
Commit 0cb996ee8c6ddd32e03d6396890764ab349503b6
Headers show

Comments

Simon Heimberg - June 26, 2013, 9:35 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1372281181 -7200
# Node ID dac1a6dc604928b5fc4a74acd37d79d95fe3c28a
# Parent  fd803f71beba3b8e63920f74952b3193810a7413
tests: run pyflakes on files from manifest which could be python files

Patch

diff -r fd803f71beba -r dac1a6dc6049 tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t	Mit Jun 26 23:12:55 2013 +0200
+++ b/tests/test-check-pyflakes.t	Mit Jun 26 23:13:01 2013 +0200
@@ -1,6 +1,21 @@ 
   $ "$TESTDIR/hghave" pyflakes || exit 80
   $ cd "`dirname "$TESTDIR"`"
-  $ pyflakes mercurial hgext 2>&1 | "$TESTDIR/filterpyflakes.py"
+
+run pyflakes on all tracked files ending in .py or without a file ending
+(skipping binary file random-seed)
+  $ hg manifest | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \
+  > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
+  contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
+  setup.py:*: 'sha' imported but unused (glob)
+  setup.py:*: 'zlib' imported but unused (glob)
+  setup.py:*: 'bz2' imported but unused (glob)
+  setup.py:*: 'py2exe' imported but unused (glob)
+  tests/hghave.py:*: 'hgext' imported but unused (glob)
+  tests/hghave.py:*: '_lsprof' imported but unused (glob)
+  tests/hghave.py:*: 'publish_cmdline' imported but unused (glob)
+  tests/hghave.py:*: 'pygments' imported but unused (glob)
+  tests/hghave.py:*: 'ssl' imported but unused (glob)
+  contrib/win32/hgwebdir_wsgi.py:*: 'from isapi.install import *' used; unable to detect undefined names (glob)
   hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)