

def _addOutcome(self, outcome, test, error=None, details=None, error_permitted=True):
    'Report a failure in test test.\n\n        Only one of error and details should be provided: conceptually there\n        are two separate methods:\n            addOutcome(self, test, error)\n            addOutcome(self, test, details)\n\n        :param outcome: A string describing the outcome - used as the\n            event name in the subunit stream.\n        :param error: Standard unittest positional argument form - an\n            exc_info tuple.\n        :param details: New Testing-in-python drafted API; a dict from string\n            to subunit.Content objects.\n        :param error_permitted: If True then one and only one of error or\n            details must be supplied. If False then error must not be supplied\n            and details is still optional.  '
    self._stream.write(_b(('%s: %s' % (outcome, test.id()))))
    if error_permitted:
        if ((error is None) and (details is None)):
            raise ValueError
    elif (error is not None):
        raise ValueError
    if (error is not None):
        self._stream.write(self._start_simple)
        for line in line._exc_info_to_unicode(error, test).splitlines():
            self._stream.write(('%s\n' % line).encode('utf8'))
    elif (details is not None):
        self._write_details(details)
    else:
        self._stream.write(_b('\n'))
    if ((details is not None) or (error is not None)):
        self._stream.write(self._end_simple)

dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/external/subunit/__init__.py TestProtocolClient._addOutcome/VarMisuse@117/409 `self`->`line`