changeset 27285:aef5b606d3ee

tests/filterpyflakes: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Dec 2015 22:22:09 -0800
parents f624b0e69105
children 528cf1a73ae5
files tests/filterpyflakes.py tests/test-check-py3-compat.t tests/test-check-pyflakes.t
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/filterpyflakes.py	Sun Dec 06 22:14:39 2015 -0800
+++ b/tests/filterpyflakes.py	Sun Dec 06 22:22:09 2015 -0800
@@ -2,7 +2,10 @@
 
 # Filter output by pyflakes to control which warnings we check
 
-import sys, re
+from __future__ import absolute_import
+
+import re
+import sys
 
 def makekey(typeandline):
     """
--- a/tests/test-check-py3-compat.t	Sun Dec 06 22:14:39 2015 -0800
+++ b/tests/test-check-py3-compat.t	Sun Dec 06 22:22:09 2015 -0800
@@ -143,7 +143,6 @@
   mercurial/util.py not using absolute_import
   mercurial/windows.py not using absolute_import
   setup.py not using absolute_import
-  tests/filterpyflakes.py not using absolute_import
   tests/filterpyflakes.py requires print_function
   tests/generate-working-copy-states.py not using absolute_import
   tests/generate-working-copy-states.py requires print_function
--- a/tests/test-check-pyflakes.t	Sun Dec 06 22:14:39 2015 -0800
+++ b/tests/test-check-pyflakes.t	Sun Dec 06 22:22:09 2015 -0800
@@ -7,6 +7,6 @@
 
   $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
-  tests/filterpyflakes.py:58: undefined name 'undefinedname'
+  tests/filterpyflakes.py:61: undefined name 'undefinedname'