Patchwork [6,of,8] tests/test-walkrepo: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 8, 2015, 3:35 a.m.
Message ID <17c02dc9c7c16d6fda4b.1449545706@gps-mbp.local>
Download mbox | patch
Permalink /patch/11920/
State Accepted
Headers show

Comments

Gregory Szorc - Dec. 8, 2015, 3:35 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1449468319 28800
#      Sun Dec 06 22:05:19 2015 -0800
# Node ID 17c02dc9c7c16d6fda4b6d1601bf5f5c772d01b0
# Parent  947820e390d178773beaef09af96b63c09113df1
tests/test-walkrepo: use absolute_import

Patch

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
@@ -217,9 +217,8 @@ 
   tests/test-ui-verbosity.py not using absolute_import
   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
   tests/tinyproxy.py not using absolute_import
diff --git a/tests/test-walkrepo.py b/tests/test-walkrepo.py
--- a/tests/test-walkrepo.py
+++ b/tests/test-walkrepo.py
@@ -1,10 +1,21 @@ 
+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('.')