Exemplo n.º 1
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=RuntimeError('Oops')):
         raise processutils.ProcessExecutionError
Exemplo n.º 2
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         raise processutils.ProcessExecutionError(description='Oops')
Exemplo n.º 3
0
 def test_reraise_false(self):
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=False):
         raise processutils.ProcessExecutionError(description='Oops')
Exemplo n.º 4
0
 def test_no_exception(self):
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         pass
Exemplo n.º 5
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         1 / 0
Exemplo n.º 6
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=RuntimeError('Oops')):
         raise processutils.ProcessExecutionError
Exemplo n.º 7
0
 def test_reraise_false(self):
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=False):
         raise processutils.ProcessExecutionError(description='Oops')
Exemplo n.º 8
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         raise processutils.ProcessExecutionError(description='Oops')
Exemplo n.º 9
0
 def f():
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         1 / 0
Exemplo n.º 10
0
 def test_no_exception(self):
     with srb.handle_process_execution_error(
             message='', info_message='', reraise=True):
         pass