summaryrefslogtreecommitdiff
path: root/python/subunit/__init__.py
diff options
context:
space:
mode:
authorJonathan Lange <jml@canonical.com>2012-02-10 11:26:44 +0000
committerJonathan Lange <jml@canonical.com>2012-02-10 11:26:44 +0000
commit5a596298fcfe15a2299bb49b7927c5ea037df885 (patch)
tree21d9edfe44e3ac2b8fffde4301e5fa41343a64cd /python/subunit/__init__.py
parent2fff53f50703aadf7856cb9aa54f6f0fe35e6483 (diff)
parent5c1a9d0cbe7cddead8db74f1681121ef36e56616 (diff)
downloadsubunit-5a596298fcfe15a2299bb49b7927c5ea037df885.tar.gz
et binary mode on the stream for forwarding subunit output (mgz)
Diffstat (limited to 'python/subunit/__init__.py')
-rw-r--r--python/subunit/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py
index b30b8fe..a82726e 100644
--- a/python/subunit/__init__.py
+++ b/python/subunit/__init__.py
@@ -1131,7 +1131,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
@@ -1144,6 +1144,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):