changeset 14175:b452abffcb15

tests: add pyflakes checking for assigned to but never used
author timeless <timeless@mozdev.org>
date Sun, 01 May 2011 17:27:41 +0200
parents bab267e7fc1a
children dea68bddfb87
files tests/filterpyflakes.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/filterpyflakes.py	Sun May 01 17:20:40 2011 +0200
+++ b/tests/filterpyflakes.py	Sun May 01 17:27:41 2011 +0200
@@ -18,7 +18,11 @@
 lines = []
 for line in sys.stdin:
     # We whitelist tests
-    if not re.search("imported but unused", line):
+    pats = [
+            r"imported but unused",
+            r"local variable '.*' is assigned to but never used",
+           ]
+    if not re.search('|'.join(pats), line):
         continue
     lines.append(line)