def METHOD_NAME():
    '''Test the exceptions that should be raised by NanTestTrans.
    '''
    _, invoke = get_invoke("test11_different_iterates_over_one_invoke.f90",
                           "gocean1.0", idx=0)
    nan_test = NanTestTrans()
    omp = OMPParallelLoopTrans()
    omp.apply(invoke.schedule[0])
    with pytest.raises(TransformationError) as err:
        nan_test.apply(invoke.schedule[0].dir_body[0],
                       options={"region_name": ("a", "b")})
    assert "Error in NanTestTrans: Application to a Loop without its "\
           "parent Directive is not allowed." in str(err.value)
    with pytest.raises(TransformationError) as err:
        nan_test.apply(invoke.schedule[0].dir_body[0].loop_body[0],
                       options={"region_name": ("a", "b")})
    assert "Error in NanTestTrans: Application to Nodes enclosed within a "\
           "thread-parallel region is not allowed." in str(err.value)