diff options
| author | Jonathan Lange <jml@canonical.com> | 2012-02-10 11:26:44 +0000 |
|---|---|---|
| committer | Jonathan Lange <jml@canonical.com> | 2012-02-10 11:26:44 +0000 |
| commit | 7e1253a627b0d89825d11ac2fa9bdb48e5570a69 (patch) | |
| tree | 21d9edfe44e3ac2b8fffde4301e5fa41343a64cd /python/subunit/__init__.py | |
| parent | 29021cef8d10e194c1229b73c5388502b8c8aa74 (diff) | |
| parent | a0f19ae8910fba0b7164fedeae7cf710aff3dc2c (diff) | |
| download | subunit-git-7e1253a627b0d89825d11ac2fa9bdb48e5570a69.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__.py | 4 |
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): |
