def test_debug_error_message():
    """tests that debug_error_message raises an
    exception when it should."""

    prev_value = config.compute_test_value

    for mode in ['ignore', 'raise']:

        try:
            config.compute_test_value = mode

            try:
                op.debug_error_message('msg')
                raised = False
            except __HOLE__:
                raised = True
            assert raised
        finally:
            config.compute_test_value = prev_value
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/gof/tests/test_op.py/test_debug_error_message