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

login
register
mail settings
Submitter Augie Fackler
Date Aug. 28, 2017, 3:27 p.m.
Message ID <02257732eec8eab19c08.1503934057@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/23429/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 28, 2017, 3:27 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1503436520 14400
#      Tue Aug 22 17:15:20 2017 -0400
# Node ID 02257732eec8eab19c08175517370515da5712d9
# Parent  dc6d7a28a60abcf771feb40c86d3d23364f5d815
tests: update test-obsolete to pass our import checker

Patch

diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -1241,8 +1241,14 @@  1) We want to make sure that the cached 
 bookmarks change
   $ cd ..
   $ cat >$TESTTMP/test_extension.py  << EOF
+  > from __future__ import absolute_import, print_function
   > import weakref
-  > from mercurial import cmdutil, extensions, bookmarks, repoview
+  > from mercurial import (
+  >   bookmarks,
+  >   cmdutil,
+  >   extensions,
+  >   repoview,
+  > )
   > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
   >  reporef = weakref.ref(bkmstoreinst._repo)
   >  def trhook(tr):
@@ -1250,7 +1256,7 @@  bookmarks change
   >   hidden1 = repoview.computehidden(repo)
   >   hidden = repoview.filterrevs(repo, 'visible')
   >   if sorted(hidden1) != sorted(hidden):
-  >     print "cache inconsistency"
+  >     print("cache inconsistency")
   >  bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
   >  orig(bkmstoreinst, *args, **kwargs)
   > def extsetup(ui):