Skip to content

Commit 238c509

Browse files
committed
TST: adjust tests for array-api-compat 1.13
1 parent 397c11c commit 238c509

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_funcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ def test_python_scalar(self, xp: ModuleType):
973973
xp_assert_equal(isclose(0, 1, xp=xp), xp.asarray(False))
974974

975975
def test_all_python_scalars(self):
976-
with pytest.raises(TypeError, match="Unrecognized"):
976+
with pytest.raises(TypeError, match=r"array_namespace requires .* array input"):
977977
_ = isclose(0, 0)
978978

979979
def test_xp(self, xp: ModuleType):
@@ -1069,7 +1069,7 @@ def test_python_scalar(self, xp: ModuleType):
10691069
xp_assert_equal(kron(1, 1, xp=xp), xp.asarray(1))
10701070

10711071
def test_all_python_scalars(self):
1072-
with pytest.raises(TypeError, match="Unrecognized"):
1072+
with pytest.raises(TypeError, match=r"array_namespace requires .* array input"):
10731073
_ = kron(1, 1)
10741074

10751075
def test_device(self, xp: ModuleType, device: Device):
@@ -1401,7 +1401,7 @@ def test_python_scalar(
14011401

14021402
@pytest.mark.parametrize("assume_unique", [True, False])
14031403
def test_all_python_scalars(self, assume_unique: bool):
1404-
with pytest.raises(TypeError, match="Unrecognized"):
1404+
with pytest.raises(TypeError, match=r"array_namespace requires .* array input"):
14051405
_ = setdiff1d(0, 0, assume_unique=assume_unique)
14061406

14071407
@assume_unique

tests/test_testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_shape_dtype(self, xp: ModuleType, func: Callable[..., None]):
6464
def test_namespace(self, xp: ModuleType, func: Callable[..., None]):
6565
with pytest.raises(AssertionError, match="namespaces do not match"):
6666
func(xp.asarray(0), np.asarray(0))
67-
with pytest.raises(TypeError, match="Unrecognized array input"):
67+
with pytest.raises(TypeError, match=r"array_namespace requires .* array input"):
6868
func(xp.asarray(0), 0)
6969
with pytest.raises(TypeError, match="list is not a supported array type"):
7070
func(xp.asarray([0]), [0])

0 commit comments

Comments
 (0)