test-pyflakes: detect undefined name error
authorYuya Nishihara <yuya@tcha.org>
Tue, 29 Apr 2014 12:54:01 +0900
changeset 21232 0768cda8b579
parent 21231 1ce16c7b7fb4
child 21233 213fd1a99cd9
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'
tests/filterpyflakes.py
--- 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):