Patchwork [03,of,10] tests: update test-log to pass our import checker

login
register
mail settings
Submitter Augie Fackler
Date Aug. 28, 2017, 2:55 p.m.
Message ID <11a6c1d535b01c51e65f.1503932154@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/23414/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 28, 2017, 2:55 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1503435502 14400
#      Tue Aug 22 16:58:22 2017 -0400
# Node ID 11a6c1d535b01c51e65fd8527542cd271b147398
# Parent  87e153a77ff33905183cd5491b753918d256c388
tests: update test-log to pass our import checker

Patch

diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -2027,7 +2027,8 @@  Check that adding an arbitrary name show
 
   $ cat > ../names.py <<EOF
   > """A small extension to test adding arbitrary names to a repo"""
-  > from mercurial.namespaces import namespace
+  > from __future__ import absolute_import
+  > from mercurial import namespaces
   > 
   > def reposetup(ui, repo):
   >     foo = {'foo': repo[0].node()}
@@ -2035,9 +2036,10 @@  Check that adding an arbitrary name show
   >     namemap = lambda r, name: foo.get(name)
   >     nodemap = lambda r, node: [name for name, n in foo.iteritems()
   >                                if n == node]
-  >     ns = namespace("bars", templatename="bar", logname="barlog",
-  >                    colorname="barcolor", listnames=names, namemap=namemap,
-  >                    nodemap=nodemap)
+  >     ns = namespaces.namespace(
+  >         "bars", templatename="bar", logname="barlog",
+  >         colorname="barcolor", listnames=names, namemap=namemap,
+  >         nodemap=nodemap)
   > 
   >     repo.names.addnamespace(ns)
   > EOF