diff --git a/test/test_arraycontext.py b/test/test_arraycontext.py index 4bc14872095c876f2455323bafd3321a159194a5..2d952fb1247eab22ac2f2a61c249776a82c29b8d 100644 --- a/test/test_arraycontext.py +++ b/test/test_arraycontext.py @@ -1171,16 +1171,17 @@ def test_numpy_conversion(actx_factory): assert np.allclose(ac.mass, ac_roundtrip.mass) assert np.allclose(ac.momentum[0], ac_roundtrip.momentum[0]) - from dataclasses import replace - ac_with_cl = replace(ac, enthalpy=ac_actx.mass) - with pytest.raises(TypeError): - actx.from_numpy(ac_with_cl) + if not isinstance(actx, NumpyArrayContext): + from dataclasses import replace + ac_with_cl = replace(ac, enthalpy=ac_actx.mass) + with pytest.raises(TypeError): + actx.from_numpy(ac_with_cl) - with pytest.raises(TypeError): - actx.from_numpy(ac_actx) + with pytest.raises(TypeError): + actx.from_numpy(ac_actx) - with pytest.raises(TypeError): - actx.to_numpy(ac) + with pytest.raises(TypeError): + actx.to_numpy(ac) # }}}