Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-no-path-info.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 | 9f67cf7cc28e |
children | c42a3fd5c1fc |
line wrap: on
line diff
--- a/tests/test-hgweb-no-path-info.t Sun Apr 10 21:32:08 2016 +0000 +++ b/tests/test-hgweb-no-path-info.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' @@ -59,11 +62,11 @@ > print '---- ERRORS' > print errors.getvalue() > - > output = StringIO() + > output = stringio() > env['QUERY_STRING'] = 'style=atom' > process(hgweb('.', name='repo')) > - > output = StringIO() + > output = stringio() > env['QUERY_STRING'] = 'style=raw' > process(hgwebdir({'repo': '.'})) > EOF