Skip to content

Commit dba4f53

Browse files
kaushikcfdinducer
authored andcommitted
test tweaks for NumpyArrayContext
1 parent d22dddc commit dba4f53

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/test_arraycontext.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from arraycontext.pytest import (_PytestPyOpenCLArrayContextFactoryWithClass,
4545
_PytestPytatoPyOpenCLArrayContextFactory,
4646
_PytestEagerJaxArrayContextFactory,
47-
_PytestPytatoJaxArrayContextFactory)
47+
_PytestPytatoJaxArrayContextFactory,
4848
_PytestPytatoPyOpenCLArrayContextFactory,
4949
_PytestNumpyArrayContextFactory)
5050

@@ -1138,7 +1138,11 @@ def test_flatten_with_leaf_class(actx_factory):
11381138
# {{{ test from_numpy and to_numpy
11391139

11401140
def test_numpy_conversion(actx_factory):
1141+
from arraycontext import NumpyArrayContext
1142+
11411143
actx = actx_factory()
1144+
if isinstance(actx, NumpyArrayContext):
1145+
pytest.skip("Irrelevant tests for NumpyArrayContext")
11421146

11431147
nelements = 42
11441148
ac = MyContainer(
@@ -1317,6 +1321,8 @@ def test_container_equality(actx_factory):
13171321
class Foo:
13181322
u: DOFArray
13191323

1324+
__array_priority__ = 1 # disallow numpy arithmetic to take precedence
1325+
13201326
@property
13211327
def array_context(self):
13221328
return self.u.array_context

0 commit comments

Comments
 (0)