def METHOD_NAME(self, expr, expected):
    """Tests code generation on skewed indices."""
    grid = Grid(shape=(16, 16, 16))
    x, y, z = grid.dimensions
    u = Function(name='u', grid=grid)  # noqa
    v = Function(name='v', grid=grid)  # noqa
    eqn = eval(expr)
    # List comprehension would need explicit locals/globals mappings to eval
    op = Operator(eqn, opt=('blocking', {'skewing': True}))
    op.apply()
    iters = FindNodes(Iteration).visit(op)
    assert len([i for i in iters if i.dim.is_Time]) == 0
    assert_blocking(op, {})  # no blocking is expected in the absence of time
    iters = FindNodes(Iteration).visit(op)
    assert len(iters) == 3
    assert iters[0].dim is x
    assert iters[1].dim is y
    assert iters[2].dim is z
    skewed = [i.expr for i in FindNodes(Expression).visit(op)]
    assert str(skewed[0]).replace(' ', '') == expected