[PATCH 4 of 8 v3] tests: make test-symlink-os-yes-fs-no use absolute_import
Pulkit Goyal
7895pulkit at gmail.com
Wed Apr 13 16:01:47 EDT 2016
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1460575711 -19800
# Thu Apr 14 00:58:31 2016 +0530
# Node ID 1ae998c1d09433e33c1bb1d0db80c5a3dddb93a8
# Parent 90fdeea6c5db4acc972c8bf977850d6b396eed35
tests: make test-symlink-os-yes-fs-no 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
@@ -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
diff --git a/tests/test-symlink-os-yes-fs-no.py b/tests/test-symlink-os-yes-fs-no.py
--- a/tests/test-symlink-os-yes-fs-no.py
+++ b/tests/test-symlink-os-yes-fs-no.py
@@ -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')
More information about the Mercurial-devel
mailing list