tests: add pyflakes checking for assigned to but never used
authortimeless <timeless@mozdev.org>
Sun, 01 May 2011 17:27:41 +0200
changeset 14175 b452abffcb15
parent 14174 bab267e7fc1a
child 14176 dea68bddfb87
tests: add pyflakes checking for assigned to but never used
tests/filterpyflakes.py
--- 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)