test-pyflakes: detect undefined name error
It should be able to catch the following mistakes at
2606e7f227f6:
mercurial/exchange.py:590: undefined name 'UnknownPartError'
mercurial/match.py:346: undefined name 'pat'
mercurial/win32.py:365: undefined name '_ERROR_NO_MORE_FILES'
tests/killdaemons.py:46: undefined name 'check'
--- a/tests/filterpyflakes.py Fri May 02 18:25:23 2014 +0900
+++ b/tests/filterpyflakes.py Tue Apr 29 12:54:01 2014 +0900
@@ -32,6 +32,7 @@
r"imported but unused",
r"local variable '.*' is assigned to but never used",
r"unable to detect undefined names",
+ r"undefined name '.*'",
]
for msgtype, pat in enumerate(pats):
if re.search(pat, line):