changeset 32277:80e3002cd29e

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 13 May 2017 11:31:36 -0700
parents 1a3a08b5d4d5
children 7c3ef55dedbe
files tests/filterpyflakes.py tests/test-check-pyflakes.t
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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'