

def test_mismatch_set_raises_error(self, backend, elems, x):
    'The iterset of the parloop should match the dataset of the direct dat.'
    kernel_wo = 'void kernel_wo(unsigned int* x) { *x = 42; }'
    with pytest.raises(MapValueError):
        op2.par_loop(op2.Kernel(kernel_wo, 'kernel_wo'), op2.Set(elems.size), x(op2.WRITE))

dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py TestDirectLoop.test_mismatch_set_raises_error/original