changeset 21293:507ce509fd22

filterpyflakes: make memoryview filtering unconditional
author Matt Mackall <mpm@selenic.com>
date Tue, 13 May 2014 19:22:40 -0500
parents a7a9d84f5e4a
children 1ae3cd6f836c
files tests/filterpyflakes.py tests/test-check-pyflakes.t
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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
--- a/tests/test-check-pyflakes.t	Tue May 13 15:22:36 2014 -0500
+++ b/tests/test-check-pyflakes.t	Tue May 13 19:22:40 2014 -0500
@@ -17,6 +17,6 @@
   tests/hghave.py:*: 'pygments' imported but unused (glob)
   tests/hghave.py:*: 'ssl' imported but unused (glob)
   contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
-  tests/filterpyflakes.py:59: undefined name 'undefinedname'
+  tests/filterpyflakes.py:58: undefined name 'undefinedname'
   
 #endif