changeset 40262:c8f164061212

tests: fix inline extension in test-fncache.t for Python 3 # skip-blame just some b prefixing Differential Revision: https://phab.mercurial-scm.org/D5083
author Augie Fackler <augie@google.com>
date Sat, 13 Oct 2018 09:03:08 -0400
parents 4b5d9eb1428f
children 8cf459d8b111
files contrib/python3-whitelist tests/test-fncache.t
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Sat Oct 13 08:59:06 2018 -0400
+++ b/contrib/python3-whitelist	Sat Oct 13 09:03:08 2018 -0400
@@ -200,6 +200,7 @@
 test-fix-topology.t
 test-fix.t
 test-flags.t
+test-fncache.t
 test-generaldelta.t
 test-getbundle.t
 test-git-export.t
--- a/tests/test-fncache.t	Sat Oct 13 08:59:06 2018 -0400
+++ b/tests/test-fncache.t	Sat Oct 13 09:03:08 2018 -0400
@@ -305,13 +305,13 @@
   > def trwrapper(orig, self, *args, **kwargs):
   >     tr = orig(self, *args, **kwargs)
   >     def fail(tr):
-  >         raise error.Abort("forced transaction failure")
+  >         raise error.Abort(b"forced transaction failure")
   >     # zzz prefix to ensure it sorted after store.write
-  >     tr.addfinalize('zzz-forcefails', fail)
+  >     tr.addfinalize(b'zzz-forcefails', fail)
   >     return tr
   > 
   > def abortwrapper(orig, self, *args, **kwargs):
-  >     raise error.Abort("forced transaction failure")
+  >     raise error.Abort(b"forced transaction failure")
   > 
   > def uisetup(ui):
   >     extensions.wrapfunction(localrepo.localrepository, 'transaction',
@@ -453,7 +453,7 @@
   > def extsetup(ui):
   >     def wrapstore(orig, requirements, *args):
   >         store = orig(requirements, *args)
-  >         if 'store' in requirements and 'fncache' in requirements:
+  >         if b'store' in requirements and b'fncache' in requirements:
   >             instrumentfncachestore(store, ui)
   >         return store
   >     extensions.wrapfunction(localrepo, 'makestore', wrapstore)
@@ -461,7 +461,7 @@
   > def instrumentfncachestore(fncachestore, ui):
   >     class instrumentedfncache(type(fncachestore.fncache)):
   >         def _load(self):
-  >             ui.warn('fncache load triggered!\n')
+  >             ui.warn(b'fncache load triggered!\n')
   >             super(instrumentedfncache, self)._load()
   >     fncachestore.fncache.__class__ = instrumentedfncache
   > EOF