changeset 36182:4f0439981a8a

py3: add b'' prefixes in test-worker.t # skip-blame because we are just adding b'' Differential Revision: https://phab.mercurial-scm.org/D2258
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 14 Feb 2018 15:58:11 +0530
parents f1addba385e5
children 44a519ec5077
files tests/test-worker.t
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-worker.t	Wed Feb 14 15:46:57 2018 +0530
+++ b/tests/test-worker.t	Wed Feb 14 15:58:11 2018 +0530
@@ -12,7 +12,7 @@
   > def abort(ui, args):
   >     if args[0] == 0:
   >         # by first worker for test stability
-  >         raise error.Abort('known exception')
+  >         raise error.Abort(b'known exception')
   >     return runme(ui, [])
   > def exc(ui, args):
   >     if args[0] == 0:
@@ -21,25 +21,25 @@
   >     return runme(ui, [])
   > def runme(ui, args):
   >     for arg in args:
-  >         ui.status('run\n')
+  >         ui.status(b'run\n')
   >         yield 1, arg
   >     time.sleep(0.1) # easier to trigger killworkers code path
   > functable = {
-  >     'abort': abort,
-  >     'exc': exc,
-  >     'runme': runme,
+  >     b'abort': abort,
+  >     b'exc': exc,
+  >     b'runme': runme,
   > }
   > cmdtable = {}
   > command = registrar.command(cmdtable)
-  > @command(b'test', [], 'hg test [COST] [FUNC]')
-  > def t(ui, repo, cost=1.0, func='runme'):
+  > @command(b'test', [], b'hg test [COST] [FUNC]')
+  > def t(ui, repo, cost=1.0, func=b'runme'):
   >     cost = float(cost)
   >     func = functable[func]
-  >     ui.status('start\n')
+  >     ui.status(b'start\n')
   >     runs = worker.worker(ui, cost, func, (ui,), range(8))
   >     for n, i in runs:
   >         pass
-  >     ui.status('done\n')
+  >     ui.status(b'done\n')
   > EOF
   $ abspath=`pwd`/t.py
   $ hg init