tests: remove special handling for undefined memoryview
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 13 May 2017 11:31:36 -0700
changeset 32277 80e3002cd29e
parent 32276 1a3a08b5d4d5
child 32278 7c3ef55dedbe
tests: remove special handling for undefined memoryview 'memoryview' was introduced in Python 2.7. 4adc090fa2fb added code to filterpyflakes.py to ignore "undefined name 'memoryview'" pyflakes warnings. Since we no longer support <Python 2.7, we can remove this workaround.
tests/filterpyflakes.py
tests/test-check-pyflakes.t
--- a/tests/filterpyflakes.py	Sat May 13 11:20:51 2017 -0700
+++ b/tests/filterpyflakes.py	Sat May 13 11:31:36 2017 -0700
@@ -11,7 +11,7 @@
 for line in sys.stdin:
     # We blacklist tests that are too noisy for us
     pats = [
-        r"undefined name '(WindowsError|memoryview)'",
+        r"undefined name 'WindowsError'",
         r"redefinition of unused '[^']+' from line",
     ]
 
@@ -33,7 +33,6 @@
     sys.stdout.write(line)
 print()
 
-# self test of "undefined name" detection for other than 'memoryview'
+# self test of "undefined name" detection
 if False:
-    print(memoryview)
     print(undefinedname)
--- a/tests/test-check-pyflakes.t	Sat May 13 11:20:51 2017 -0700
+++ b/tests/test-check-pyflakes.t	Sat May 13 11:31:36 2017 -0700
@@ -10,5 +10,5 @@
   > -X mercurial/pycompat.py -X contrib/python-zstandard \
   > 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
-  tests/filterpyflakes.py:39: undefined name 'undefinedname'
+  tests/filterpyflakes.py:38: undefined name 'undefinedname'