# HG changeset patch # User timeless # Date 2011-05-01 15:27:41 # Node ID b452abffcb1557153fe28edf50dc86da40e1d399 # Parent bab267e7fc1a3bf972b8c7f329fe199900f0bb94 tests: add pyflakes checking for assigned to but never used diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py --- a/tests/filterpyflakes.py +++ b/tests/filterpyflakes.py @@ -18,7 +18,11 @@ def makekey(message): 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)