Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-no-request-uri.t @ 28861:86db5cb55d46
pycompat: switch to util.stringio for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Sun, 10 Apr 2016 20:55:37 +0000 |
parents | ba7809b053fd |
children | c42a3fd5c1fc |
line wrap: on
line diff
--- a/tests/test-hgweb-no-request-uri.t Sun Apr 10 21:32:08 2016 +0000 +++ b/tests/test-hgweb-no-request-uri.t Sun Apr 10 20:55:37 2016 +0000 @@ -18,14 +18,17 @@ > from __future__ import absolute_import > import os > import sys - > from StringIO import StringIO > from mercurial.hgweb import ( > hgweb, > hgwebdir, > ) + > from mercurial import ( + > util, + > ) + > stringio = util.stringio > - > errors = StringIO() - > input = StringIO() + > errors = stringio() + > input = stringio() > > def startrsp(status, headers): > print '---- STATUS' @@ -58,22 +61,22 @@ > print '---- ERRORS' > print errors.getvalue() > - > output = StringIO() + > output = stringio() > env['PATH_INFO'] = '/' > env['QUERY_STRING'] = 'style=atom' > process(hgweb('.', name = 'repo')) > - > output = StringIO() + > output = stringio() > env['PATH_INFO'] = '/file/tip/' > env['QUERY_STRING'] = 'style=raw' > process(hgweb('.', name = 'repo')) > - > output = StringIO() + > output = stringio() > env['PATH_INFO'] = '/' > env['QUERY_STRING'] = 'style=raw' > process(hgwebdir({'repo': '.'})) > - > output = StringIO() + > output = stringio() > env['PATH_INFO'] = '/repo/file/tip/' > env['QUERY_STRING'] = 'style=raw' > process(hgwebdir({'repo': '.'}))