tests/test-wireproto.py
changeset 28861 86db5cb55d46
parent 28860 50d11dd8ac02
child 33767 b47fe9733d76
--- a/tests/test-wireproto.py	Sun Apr 10 21:32:08 2016 +0000
+++ b/tests/test-wireproto.py	Sun Apr 10 20:55:37 2016 +0000
@@ -1,9 +1,10 @@
 from __future__ import absolute_import, print_function
 
-import StringIO
 from mercurial import (
+    util,
     wireproto,
 )
+stringio = util.stringio
 
 class proto(object):
     def __init__(self, args):
@@ -25,7 +26,7 @@
         return wireproto.dispatch(self.serverrepo, proto(args), cmd)
 
     def _callstream(self, cmd, **args):
-        return StringIO.StringIO(self._call(cmd, **args))
+        return stringio(self._call(cmd, **args))
 
     @wireproto.batchable
     def greet(self, name):