Skip to content

Commit 48a8442

Browse files
committed
Check specially that the result of linalg functions is not a unnamed tuple
1 parent 1220d6e commit 48a8442

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

array_api_tests/test_linalg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def _test_namedtuple(res, fields, func_name):
106106
# a tuple subclass with the right fields in the right order.
107107

108108
assert isinstance(res, tuple), f"{func_name}() did not return a tuple"
109+
assert type(res) != tuple, f"{func_name}() did not return a namedtuple"
109110
assert len(res) == len(fields), f"{func_name}() result tuple not the correct length (should have {len(fields)} elements)"
110111
for i, field in enumerate(fields):
111112
assert hasattr(res, field), f"{func_name}() result namedtuple doesn't have the '{field}' field"

0 commit comments

Comments
 (0)