コード例 #1
0
 def test_no_swallow(self):
     with self.assertNoSwallow() as raised:
         raise exception_handling.noswallow(raised)
コード例 #2
0
def test_no_swallow():
    raised = CustomException()
    with pytest.raises(CustomException) as caught:
        with exception_handling.get_exception_swallowing_context():
            raise exception_handling.noswallow(raised)
    assert raised is caught.value
コード例 #3
0
def test_no_swallow():
    raised = CustomException()
    with pytest.raises(CustomException) as caught:
        with exception_handling.get_exception_swallowing_context():
            raise exception_handling.noswallow(raised)
    assert raised is caught.value
コード例 #4
0
 def test_no_swallow(self):
     with self.assertNoSwallow() as raised:
         raise exception_handling.noswallow(raised)