Mercurial > hg
diff tests/test-hgweb-no-request-uri.t @ 39892:b55747ca518f
py3: ensure printing to stdout uses str in test-hgweb-no-request-uri.t
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 27 Sep 2018 22:07:12 -0400 |
parents | 5abc47d4ca6b |
children | f80f7a67e176 |
line wrap: on
line diff
--- a/tests/test-hgweb-no-request-uri.t Thu Sep 27 13:57:50 2018 -0700 +++ b/tests/test-hgweb-no-request-uri.t Thu Sep 27 22:07:12 2018 -0400 @@ -23,6 +23,7 @@ > hgwebdir, > ) > from mercurial import ( + > encoding, > util, > ) > stringio = util.stringio @@ -55,11 +56,11 @@ > > def process(app): > content = app(env, startrsp) - > sys.stdout.write(output.getvalue()) - > sys.stdout.write(''.join(content)) + > sys.stdout.write(encoding.strfromlocal(output.getvalue())) + > sys.stdout.write(encoding.strfromlocal(b''.join(content))) > getattr(content, 'close', lambda : None)() > print('---- ERRORS') - > print(errors.getvalue()) + > print(encoding.strfromlocal(errors.getvalue())) # avoid b'' output diff > > output = stringio() > env['PATH_INFO'] = '/'