def test_outcomeexception_passes_except_Exception(): with pytest.raises(outcomes.OutcomeException): try: raise outcomes.OutcomeException('test') except Exception: pass
def test_outcomeexception_exceptionattributes(): outcome = outcomes.OutcomeException("test") assert outcome.args[0] == outcome.msg
def test_outcomeexception_passes_except_Exception() -> None: with pytest.raises(outcomes.OutcomeException): try: raise outcomes.OutcomeException("test") except Exception: raise NotImplementedError()