changeset 33965:251bd3fddd9b

tests: update test-log to pass our import checker
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 16:58:22 -0400
parents bfafd189edd9
children e98dab3fafbc
files tests/test-log.t
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-log.t	Tue Aug 22 16:58:13 2017 -0400
+++ b/tests/test-log.t	Tue Aug 22 16:58:22 2017 -0400
@@ -2027,7 +2027,8 @@
 
   $ 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 @@
   >     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