diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -165,6 +165,7 @@ test-empty-group.t test-empty.t test-encode.t +test-encoding-align.t test-encoding-func.py test-encoding-textwrap.t test-encoding.t diff --git a/tests/test-encoding-align.t b/tests/test-encoding-align.t --- a/tests/test-encoding-align.t +++ b/tests/test-encoding-align.t @@ -5,6 +5,7 @@ $ hg init t $ cd t $ "$PYTHON" << EOF + > from mercurial import pycompat > # (byte, width) = (6, 4) > s = b"\xe7\x9f\xad\xe5\x90\x8d" > # (byte, width) = (7, 7): odd width is good for alignment test @@ -21,14 +22,17 @@ > command = registrar.command(cmdtable) > > @command(b'showoptlist', - > [('s', 'opt1', '', 'short width' + ' %(s)s' * 8, '%(s)s'), - > ('m', 'opt2', '', 'middle width' + ' %(m)s' * 8, '%(m)s'), - > ('l', 'opt3', '', 'long width' + ' %(l)s' * 8, '%(l)s')], - > '') + > [(b's', b'opt1', b'', b'short width' + (b' ' +%(s)s) * 8, %(s)s), + > (b'm', b'opt2', b'', b'middle width' + (b' ' + %(m)s) * 8, %(m)s), + > (b'l', b'opt3', b'', b'long width' + (b' ' + %(l)s) * 8, %(l)s)], + > b'') > def showoptlist(ui, repo, *pats, **opts): > '''dummy command to show option descriptions''' > return 0 - > """ % globals()) + > """ % {b's': pycompat.byterepr(s), + > b'm': pycompat.byterepr(m), + > b'l': pycompat.byterepr(l), + > }) > f.close() > EOF $ S=`cat s`