[PATCH 3 of 8 v3] tests: make test-ui-color use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Wed Apr 13 16:01:46 EDT 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1460575568 -19800
#      Thu Apr 14 00:56:08 2016 +0530
# Node ID 90fdeea6c5db4acc972c8bf977850d6b396eed35
# Parent  d5659ff88ab979482a71645facdf7f62591560de
tests: make test-ui-color 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
@@ -66,7 +66,6 @@
   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
-  tests/test-ui-color.py not using absolute_import
 
 #if py3exe
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
diff --git a/tests/test-ui-color.py b/tests/test-ui-color.py
--- a/tests/test-ui-color.py
+++ b/tests/test-ui-color.py
@@ -1,7 +1,13 @@
-from __future__ import print_function
+from __future__ import absolute_import, print_function
+
 import os
-from hgext import color
-from mercurial import dispatch, ui
+from hgext import (
+    color,
+)
+from mercurial import (
+    dispatch,
+    ui as uimod,
+)
 
 # ensure errors aren't buffered
 testui = color.colorui()
@@ -17,7 +23,7 @@
 hgrc.write('color=\n')
 hgrc.close()
 
-ui_ = ui.ui()
+ui_ = uimod.ui()
 ui_.setconfig('ui', 'formatted', 'True')
 
 # we're not interested in the output, so write that to devnull


More information about the Mercurial-devel mailing list