Skip to content

Commit b6cc704

Browse files
committed
TST: autojit: restrict object inequality check to JAX
1 parent 82547fa commit b6cc704

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/main/test_helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88

99
from array_api_extra._lib._backends import Backend
10-
from array_api_extra._lib._compat import array_namespace
10+
from array_api_extra._lib._compat import array_namespace, is_jax_namespace
1111
from array_api_extra._lib._compat import device as get_device
1212
from array_api_extra._lib._helpers import (
1313
JitLibrary,
@@ -403,7 +403,8 @@ def f(x: object) -> object:
403403
out = f(winp)
404404
assert isinstance(out, Wrapper)
405405
assert out.x[0] is winp.x[0]
406-
assert out.x[1] is not winp.x[1]
406+
if is_jax_namespace(xp):
407+
assert out.x[1] is not winp.x[1]
407408
assert_equal(out.x[1], winp.x[1])
408409

409410
def test_arraylikes_are_static(

0 commit comments

Comments
 (0)