Patchwork [5,of,7] tests: alias ui as uimod in test-revlog-ancestry/test-ui-verbosity

login
register
mail settings
Submitter Yuya Nishihara
Date April 9, 2016, 10:56 a.m.
Message ID <6f77a23ca84124dcbbfa.1460199377@mimosa>
Download mbox | patch
Permalink /patch/14463/
State Accepted
Headers show

Comments

Yuya Nishihara - April 9, 2016, 10:56 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1459866945 -32400
#      Tue Apr 05 23:35:45 2016 +0900
# Node ID 6f77a23ca84124dcbbfa9421e52fa9c50825617e
# Parent  86005c9e26842d8bbcbb8aea6d505dbbb1b612db
tests: alias ui as uimod in test-revlog-ancestry/test-ui-verbosity

Patch

diff --git a/tests/test-revlog-ancestry.py b/tests/test-revlog-ancestry.py
--- a/tests/test-revlog-ancestry.py
+++ b/tests/test-revlog-ancestry.py
@@ -3,10 +3,10 @@  import os
 from mercurial import (
     hg,
     merge,
-    ui,
+    ui as uimod,
 )
 
-u = ui.ui()
+u = uimod.ui()
 
 repo = hg.repository(u, 'test1', create=1)
 os.chdir('test1')
diff --git a/tests/test-ui-verbosity.py b/tests/test-ui-verbosity.py
--- a/tests/test-ui-verbosity.py
+++ b/tests/test-ui-verbosity.py
@@ -1,7 +1,9 @@ 
 from __future__ import absolute_import, print_function
 
 import os
-from mercurial import ui
+from mercurial import (
+    ui as uimod,
+)
 
 hgrc = os.environ['HGRCPATH']
 f = open(hgrc)
@@ -30,7 +32,7 @@  for i in xrange(64):
         f.write('debug = True\n')
     f.close()
 
-    u = ui.ui()
+    u = uimod.ui()
     if cmd_quiet or cmd_debug or cmd_verbose:
         u.setconfig('ui', 'quiet', str(bool(cmd_quiet)))
         u.setconfig('ui', 'verbose', str(bool(cmd_verbose)))