tests: use absolute_import in test-walkrepo
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 06 Dec 2015 22:05:19 -0800
changeset 27300 a8b2bf520a2a
parent 27299 74e6de99ce7f
child 27301 5defcb7d6e5f
tests: use absolute_import in test-walkrepo
tests/test-check-py3-compat.t
tests/test-walkrepo.py
--- a/tests/test-check-py3-compat.t	Sun Dec 06 22:27:53 2015 -0800
+++ b/tests/test-check-py3-compat.t	Sun Dec 06 22:05:19 2015 -0800
@@ -218,7 +218,6 @@
   tests/test-ui-verbosity.py requires print_function
   tests/test-url.py not using absolute_import
   tests/test-url.py requires print_function
-  tests/test-walkrepo.py not using absolute_import
   tests/test-walkrepo.py requires print_function
   tests/test-wireproto.py not using absolute_import
   tests/test-wireproto.py requires print_function
--- a/tests/test-walkrepo.py	Sun Dec 06 22:27:53 2015 -0800
+++ b/tests/test-walkrepo.py	Sun Dec 06 22:05:19 2015 -0800
@@ -1,9 +1,20 @@
+from __future__ import absolute_import
+
 import os
-from mercurial import hg, ui
-from mercurial.scmutil import walkrepos
-from mercurial.util import checklink
-from os import mkdir, chdir
-from os.path import join as pjoin
+
+from mercurial import (
+    hg,
+    scmutil,
+    ui,
+    util,
+)
+
+chdir = os.chdir
+mkdir = os.mkdir
+pjoin = os.path.join
+
+walkrepos = scmutil.walkrepos
+checklink = util.checklink
 
 u = ui.ui()
 sym = checklink('.')