Patchwork [3,of,9] py3: import StringIO from test utility to test-commandserver.t

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 18, 2018, 12:32 p.m.
Message ID <b63525d6a2de8e3e965f.1539865974@mimosa>
Download mbox | patch
Permalink /patch/36135/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 18, 2018, 12:32 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1539669176 -7200
#      Tue Oct 16 07:52:56 2018 +0200
# Node ID b63525d6a2de8e3e965fb684a034f199a3f41a6d
# Parent  806a11272f637e1b1074c9f2ac5c18a403a8d842
py3: import StringIO from test utility to test-commandserver.t

Patch

diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -153,15 +153,14 @@  check strict parsing of early options:
 
 check that "histedit --commands=-" can read rules from the input channel:
 
-  >>> import cStringIO
-  >>> from hgclient import check, readchannel, runcommand
+  >>> from hgclient import check, readchannel, runcommand, stringio
   >>> @check
   ... def serverinput(server):
   ...     readchannel(server)
   ...     rules = b'pick eff892de26ec\n'
   ...     runcommand(server, [b'histedit', b'0', b'--commands=-',
   ...                         b'--config', b'extensions.histedit='],
-  ...                input=cStringIO.StringIO(rules))
+  ...                input=stringio(rules))
   *** runcommand histedit 0 --commands=- --config extensions.histedit=
 
 check that --cwd doesn't persist between requests: