コード例 #1
0
ファイル: test_runner.py プロジェクト: zooba/pytest
def test_outcomeexception_passes_except_Exception():
    with pytest.raises(outcomes.OutcomeException):
        try:
            raise outcomes.OutcomeException('test')
        except Exception:
            pass
コード例 #2
0
ファイル: test_runner.py プロジェクト: huadiweilaoqy/pytest
def test_outcomeexception_exceptionattributes():
    outcome = outcomes.OutcomeException("test")
    assert outcome.args[0] == outcome.msg
コード例 #3
0
ファイル: test_runner.py プロジェクト: wsgcode/pytest
def test_outcomeexception_passes_except_Exception() -> None:
    with pytest.raises(outcomes.OutcomeException):
        try:
            raise outcomes.OutcomeException("test")
        except Exception:
            raise NotImplementedError()