tests: make test-symlink-os-yes-fs-no use absolute_import
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 14 Apr 2016 00:58:31 +0530
changeset 28916 3b453513f1fe
parent 28915 40afa22bee9b
child 28917 f798ffe7cb08
tests: make test-symlink-os-yes-fs-no use absolute_import
tests/test-check-py3-compat.t
tests/test-symlink-os-yes-fs-no.py
--- 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')