D5033: py3: add b'' prefixes in tests/test-progress.t
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sat Oct 13 01:59:02 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This makes the test pass on Python 3.
1. skip-blame because just b'' prefixes
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5033
AFFECTED FILES
contrib/python3-whitelist
tests/test-progress.t
CHANGE DETAILS
diff --git a/tests/test-progress.t b/tests/test-progress.t
--- a/tests/test-progress.t
+++ b/tests/test-progress.t
@@ -33,26 +33,26 @@
> nested = True
> loops = abs(loops)
>
- > progress = ui.makeprogress(topiclabel, unit='loopnum', total=total)
- > other = ui.makeprogress('other', unit='othernum', total=total)
+ > progress = ui.makeprogress(topiclabel, unit=b'loopnum', total=total)
+ > other = ui.makeprogress(b'other', unit=b'othernum', total=total)
> for i in range(loops):
> progress.update(i, item=getloopitem(i))
> if opts.get('parallel'):
- > other.update(i, item='other.%d' % i)
+ > other.update(i, item=b'other.%d' % i)
> if nested:
> nested_steps = 2
> if i and i % 4 == 0:
> nested_steps = 5
- > nested = ui.makeprogress('nested', unit='nestnum',
+ > nested = ui.makeprogress(b'nested', unit=b'nestnum',
> total=nested_steps)
> for j in range(nested_steps):
- > nested.update(j, item='nested.%d' % j)
+ > nested.update(j, item=b'nested.%d' % j)
> nested.complete()
> progress.complete()
>
- > topiclabel = 'loop'
+ > topiclabel = b'loop'
> def getloopitem(i):
- > return 'loop.%d' % i
+ > return b'loop.%d' % i
>
> EOF
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -406,6 +406,7 @@
test-permissions.t
test-phases-exchange.t
test-phases.t
+test-progress.t
test-pull-branch.t
test-pull-http.t
test-pull-permission.t
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list