

def _write_details(self, details):
    'Output details to the stream.\n\n        :param details: An extended details dict for a test outcome.\n        '
    self._stream.write(_b(' [ multipart\n'))
    for (name, content) in sorted(details.items()):
        self._stream.write(_b(('Content-Type: %s/%s' % (content.content_type.type, content.content_type.subtype))))
        parameters = content.content_type.parameters
        if parameters:
            self._stream.write(_b(';'))
            param_strs = []
            for (param, value) in parameters.items():
                param_strs.append(('%s=%s' % (param, value)))
            self._stream.write(_b(','.join(param_strs)))
        self._stream.write(_b(('\n%s\n' % name)))
        encoder = chunked.Encoder(self._stream)
        list(map(encoder.write, content.iter_bytes()))
        encoder.close()

dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/external/subunit/__init__.py TestProtocolClient._write_details/original