changeset 37457:d83191e9749b

py3: byte-stringify test-import.t Still the test doesn't pass. # skip-blame because just adding some b''
author Yuya Nishihara <yuya@tcha.org>
date Sat, 07 Apr 2018 13:46:32 +0900
parents 19becdf565ef
children 00e4bd97b095
files tests/test-import.t
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-import.t	Sat Apr 07 13:42:37 2018 +0900
+++ b/tests/test-import.t	Sat Apr 07 13:46:32 2018 +0900
@@ -1839,17 +1839,17 @@
   > import mercurial.cmdutil
   > 
   > def processfoo(repo, data, extra, opts):
-  >     if 'foo' in data:
-  >         extra['foo'] = data['foo']
+  >     if b'foo' in data:
+  >         extra[b'foo'] = data[b'foo']
   > def postimport(ctx):
-  >     if 'foo' in ctx.extra():
-  >         ctx.repo().ui.write('imported-foo: %s\n' % ctx.extra()['foo'])
+  >     if b'foo' in ctx.extra():
+  >         ctx.repo().ui.write(b'imported-foo: %s\n' % ctx.extra()[b'foo'])
   > 
-  > mercurial.patch.patchheadermap.append(('Foo', 'foo'))
-  > mercurial.cmdutil.extrapreimport.append('foo')
-  > mercurial.cmdutil.extrapreimportmap['foo'] = processfoo
-  > mercurial.cmdutil.extrapostimport.append('foo')
-  > mercurial.cmdutil.extrapostimportmap['foo'] = postimport
+  > mercurial.patch.patchheadermap.append((b'Foo', b'foo'))
+  > mercurial.cmdutil.extrapreimport.append(b'foo')
+  > mercurial.cmdutil.extrapreimportmap[b'foo'] = processfoo
+  > mercurial.cmdutil.extrapostimport.append(b'foo')
+  > mercurial.cmdutil.extrapostimportmap[b'foo'] = postimport
   > EOF
   $ cat >> $HGRCPATH <<EOF
   > [extensions]