Mercurial > hg-stable
changeset 28932:4eac86331acb
tests: make test-hgwebdir-paths use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 16 Apr 2016 03:35:27 +0530 |
parents | ba0e4789bd2e |
children | 6262f0215d08 |
files | tests/test-check-py3-compat.t tests/test-hgwebdir-paths.py |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-check-py3-compat.t Sat Apr 16 03:22:45 2016 +0530 +++ b/tests/test-check-py3-compat.t Sat Apr 16 03:35:27 2016 +0530 @@ -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
--- a/tests/test-hgwebdir-paths.py Sat Apr 16 03:22:45 2016 +0530 +++ b/tests/test-hgwebdir-paths.py Sat Apr 16 03:35:27 2016 +0530 @@ -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')