From a0f19ae8910fba0b7164fedeae7cf710aff3dc2c Mon Sep 17 00:00:00 2001 From: Martin Packman Date: Wed, 4 Jan 2012 10:25:24 +0000 Subject: Set binary mode on the forwarded stream in ProtocolTestCase as used by filters --- python/subunit/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index b4c9397..e14ebe3 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -1122,7 +1122,7 @@ class ProtocolTestCase(object): :seealso: TestProtocolServer (the subunit wire protocol parser). """ - def __init__(self, stream, passthrough=None, forward=False): + def __init__(self, stream, passthrough=None, forward=None): """Create a ProtocolTestCase reading from stream. :param stream: A filelike object which a subunit stream can be read @@ -1135,6 +1135,8 @@ class ProtocolTestCase(object): self._stream = stream _make_stream_binary(stream) self._passthrough = passthrough + if forward is not None: + _make_stream_binary(forward) self._forward = forward def __call__(self, result=None): -- cgit v1.2.1