def test_no_swallow(self):
     with self.assertNoSwallow() as raised:
         raise exception_handling.noswallow(raised)
Esempio n. 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
Esempio n. 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
Esempio n. 4
0
 def test_no_swallow(self):
     with self.assertNoSwallow() as raised:
         raise exception_handling.noswallow(raised)