diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py --- a/tests/filterpyflakes.py +++ b/tests/filterpyflakes.py @@ -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): """ diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -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 diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t +++ b/tests/test-check-pyflakes.t @@ -7,6 +7,6 @@ run pyflakes on all tracked files ending $ 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'