[PATCH 6 of 8] tests: make test-hgwebdir-paths use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Fri Apr 15 18:37:44 EDT 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1460757927 -19800
#      Sat Apr 16 03:35:27 2016 +0530
# Node ID afc7cefa86c52f3125b357b9b49a3d2973ed9c74
# Parent  d74af529387f5573de71ec7a6a3c317b84a79884
tests: make test-hgwebdir-paths use absolute_import

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
@@ -56,7 +56,6 @@
   tests/test-demandimport.py not using absolute_import
   tests/test-demandimport.py requires print_function
   tests/test-doctest.py not using absolute_import
-  tests/test-hgwebdir-paths.py not using absolute_import
   tests/test-trusted.py requires print_function
 
 #if py3exe
diff --git a/tests/test-hgwebdir-paths.py b/tests/test-hgwebdir-paths.py
--- a/tests/test-hgwebdir-paths.py
+++ b/tests/test-hgwebdir-paths.py
@@ -1,13 +1,21 @@
+from __future__ import absolute_import
+
 import os
-from mercurial import hg, ui
-from mercurial.hgweb.hgwebdir_mod import hgwebdir
+from mercurial import (
+    hg,
+    ui as uimod,
+)
+from mercurial.hgweb import (
+    hgwebdir_mod,
+)
+hgwebdir = hgwebdir_mod.hgwebdir
 
 os.mkdir('webdir')
 os.chdir('webdir')
 
 webdir = os.path.realpath('.')
 
-u = ui.ui()
+u = uimod.ui()
 hg.repository(u, 'a', create=1)
 hg.repository(u, 'b', create=1)
 os.chdir('b')


More information about the Mercurial-devel mailing list