def _addOutcome(self, outcome, test, error=None, details=None,
        error_permitted=True):
        """Report a failure in test test.

        Only one of error and details should be provided: conceptually there
        are two separate methods:
            addOutcome(self, test, error)
            addOutcome(self, test, details)

        :param outcome: A string describing the outcome - used as the
            event name in the subunit stream.
        :param error: Standard unittest positional argument form - an
            exc_info tuple.
        :param details: New Testing-in-python drafted API; a dict from string
            to subunit.Content objects.
        :param error_permitted: If True then one and only one of error or
            details must be supplied. If False then error must not be supplied
            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
        else:
            if error is not None:
                raise ValueError
        if error is not None:
            self._stream.write(self._start_simple)
            # XXX: this needs to be made much stricter, along the lines of
            # Martin[gz]'s work in testtools. Perhaps subunit can use that?
            for line in self._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 and 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/operator `or` -> `and`