diff tests/filterpyflakes.py @ 14140:82f0412ef7de

tests: add pyflakes checking for unused imports
author timeless <timeless@mozdev.org>
date Sun, 01 May 2011 15:22:30 +0200
parents
children 419539ea79cb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/filterpyflakes.py	Sun May 01 15:22:30 2011 +0200
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+# Filter output by pyflakes to control which warnings we check
+
+import sys, re
+
+for line in sys.stdin:
+    # We whitelist tests
+    if not re.search("imported but unused", line):
+        continue
+    sys.stdout.write(line)
+print