diff tests/test-wireproto.py @ 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 50d11dd8ac02
children b47fe9733d76
line wrap: on
line diff
--- 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):