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 | 5c1a9d0cbe7cddead8db74f1681121ef36e56616 (patch) | |
| tree | 98ad9ba700396a2365ee37d7e6c4380f38540500 /python/subunit/__init__.py | |
| parent | 29413ff987350ef1972342cbaa173e5ba6d08abc (diff) | |
| download | subunit-5c1a9d0cbe7cddead8db74f1681121ef36e56616.tar.gz | |
Set binary mode on the forwarded stream in ProtocolTestCase as used by filters
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 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): |
