tests: update test-log to pass our import checker
authorAugie Fackler <raf@durin42.com>
Tue, 22 Aug 2017 16:58:22 -0400
changeset 33965 251bd3fddd9b
parent 33964 bfafd189edd9
child 33966 e98dab3fafbc
tests: update test-log to pass our import checker
tests/test-log.t
--- 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