diff -r a7a9d84f5e4a -r 507ce509fd22 tests/filterpyflakes.py --- a/tests/filterpyflakes.py Tue May 13 15:22:36 2014 -0500 +++ b/tests/filterpyflakes.py Tue May 13 19:22:40 2014 -0500 @@ -32,11 +32,10 @@ (r"imported but unused", None), (r"local variable '.*' is assigned to but never used", None), (r"unable to detect undefined names", None), + (r"undefined name '.*'", + r"undefined name 'memoryview'") ] - if sys.version_info >= (2, 7): - pats.append((r"undefined name '.*'", None)) - else: - pats.append((r"undefined name '.*'", r"undefined name 'memoryview'")) + for msgtype, (pat, excl) in enumerate(pats): if re.search(pat, line) and (not excl or not re.search(excl, line)): break # pattern matches