[PATCH 1 of 2 V2] tests: run pyflakes on files from manifest which could be python files

Simon Heimberg simohe at besonet.ch
Mon Jul 1 14:13:13 CDT 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1372704535 -7200
# Node ID fe1b5227e8f34bb736189b3456c06f00d3fbf194
# Parent  a3b40b879d32ee35843d07c12b1e265190969556
tests: run pyflakes on files from manifest which could be python files

Skip a binary file because pyflakes 0.4.0 aborts on it.

diff -r a3b40b879d32 -r fe1b5227e8f3 tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t	Mon Jul 01 20:48:55 2013 +0200
+++ b/tests/test-check-pyflakes.t	Mon Jul 01 20:48:55 2013 +0200
@@ -1,6 +1,30 @@
   $ "$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 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \
+  > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
+  contrib/simplemerge:*: 'os' imported but unused (glob)
+  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/casesmash.py:*: local variable 'inst' is assigned to but never used (glob)
+  contrib/check-code.py:*: local variable 'po' is assigned to but never used (glob)
+  contrib/hgfixes/fix_leftover_imports.py:*: local variable 'bare_names' is assigned to but never used (glob)
+  contrib/perf.py:*: local variable 'm' is assigned to but never used (glob)
+  contrib/perf.py:*: local variable 'c' is assigned to but never used (glob)
+  doc/hgmanpage.py:*: local variable 'backref_text' is assigned to but never used (glob)
+  tests/hghave.py:*: local variable 'err' is assigned to but never used (glob)
+  tests/test-hgweb-auth.py:*: local variable 'e' is assigned to but never used (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)
   
 


More information about the Mercurial-devel mailing list