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