# HG changeset patch # User Gregory Szorc # Date 2015-12-07 06:22:09 # Node ID aef5b606d3ee3db5504d694df0a3e3aaa7b7e07b # Parent f624b0e691053f88cecfc241b68ecaadf0302f17 tests/filterpyflakes: use absolute_import 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'