tests/test-hgweb-no-path-info.t
changeset 28861 86db5cb55d46
parent 28857 9f67cf7cc28e
child 29439 c42a3fd5c1fc
--- 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