# HG changeset patch # User Matt Harbison # Date 1538100432 14400 # Node ID b55747ca518fe202b704f8f89a55f5bd196b6b93 # Parent b99903534e06f257b0ccd4cabb90f4d4cb51beb2 py3: ensure printing to stdout uses str in test-hgweb-no-request-uri.t diff -r b99903534e06 -r b55747ca518f tests/test-hgweb-no-request-uri.t --- 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'] = '/'