Skip to content

Commit 2a17b8b

Browse files
committed
Fix device test
1 parent 7e6f10b commit 2a17b8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_funcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,11 +1532,11 @@ def test_kind(self, xp: ModuleType, library: Backend):
15321532
xp_assert_equal(res, expected)
15331533

15341534

1535-
@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="unique_values returns arrays")
15361535
@pytest.mark.skip_xp_backend(
15371536
Backend.ARRAY_API_STRICTEST,
15381537
reason="data_dependent_shapes flag for unique_values is disabled",
15391538
)
1539+
@pytest.mark.xfail_xp_backend(Backend.SPARSE, reason="unique_values returns arrays")
15401540
class TestUnion1d:
15411541
def test_simple(self, xp: ModuleType):
15421542
a = xp.asarray([-1, 1, 0])
@@ -1560,6 +1560,6 @@ def test_3d(self, xp: ModuleType):
15601560
xp_assert_equal(res, expected)
15611561

15621562
def test_device(self, xp: ModuleType, device: Device):
1563-
a = xp.asarray([-1, 1, 0])
1564-
b = xp.asarray([2, -2, 0])
1563+
a = xp.asarray([-1, 1, 0], device=device)
1564+
b = xp.asarray([2, -2, 0], device=device)
15651565
assert get_device(union1d(a, b)) == device

0 commit comments

Comments
 (0)