Mercurial > hg
changeset 28916:3b453513f1fe
tests: make test-symlink-os-yes-fs-no use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 14 Apr 2016 00:58:31 +0530 |
parents | 40afa22bee9b |
children | f798ffe7cb08 |
files | tests/test-check-py3-compat.t tests/test-symlink-os-yes-fs-no.py |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-check-py3-compat.t Thu Apr 14 00:56:08 2016 +0530 +++ b/tests/test-check-py3-compat.t Thu Apr 14 00:58:31 2016 +0530 @@ -64,7 +64,6 @@ tests/test-pathencode.py requires print_function tests/test-run-tests.py not using absolute_import tests/test-simplemerge.py not using absolute_import - tests/test-symlink-os-yes-fs-no.py not using absolute_import tests/test-trusted.py requires print_function #if py3exe
--- a/tests/test-symlink-os-yes-fs-no.py Thu Apr 14 00:56:08 2016 +0530 +++ b/tests/test-symlink-os-yes-fs-no.py Thu Apr 14 00:58:31 2016 +0530 @@ -1,5 +1,14 @@ -import os, sys, time -from mercurial import hg, ui, commands, util +from __future__ import absolute_import + +import os +import sys +import time +from mercurial import ( + commands, + hg, + ui as uimod, + util, +) TESTDIR = os.environ["TESTDIR"] BUNDLEPATH = os.path.join(TESTDIR, 'bundles', 'test-no-symlinks.hg') @@ -8,7 +17,7 @@ if not getattr(os, "symlink", False): sys.exit(80) # SKIPPED_STATUS defined in run-tests.py -u = ui.ui() +u = uimod.ui() # hide outer repo hg.peer(u, {}, '.', create=True) @@ -36,10 +45,10 @@ fp.close() # reload repository -u = ui.ui() +u = uimod.ui() repo = hg.repository(u, 'test0') commands.status(u, repo) # try cloning a repo which contains symlinks -u = ui.ui() +u = uimod.ui() hg.clone(u, {}, BUNDLEPATH, 'test1')