diff options
| author | Martin Packman <martin.packman@canonical.com> | 2012-01-04 10:25:24 +0000 |
|---|---|---|
| committer | Martin Packman <martin.packman@canonical.com> | 2012-01-04 10:25:24 +0000 |
| commit | a0f19ae8910fba0b7164fedeae7cf710aff3dc2c (patch) | |
| tree | 98ad9ba700396a2365ee37d7e6c4380f38540500 /python | |
| parent | 8343524a5ee5f459e87bc15c85558a33a867f35a (diff) | |
| download | subunit-git-a0f19ae8910fba0b7164fedeae7cf710aff3dc2c.tar.gz | |
Set binary mode on the forwarded stream in ProtocolTestCase as used by filters
Diffstat (limited to 'python')
| -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 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): |
