Skip to content

Commit 6ebe822

Browse files
committed
Skip summation dtype assertions for >2023.12 for now
Also remove flaky skip as shouldn't be a problem for default runs now
1 parent a85563a commit 6ebe822

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

array_api_tests/test_linalg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from . import dtype_helpers as dh
3838
from . import pytest_helpers as ph
3939
from . import shape_helpers as sh
40+
from . import api_version
4041
from .typing import Array
4142

4243
from . import _array_module
@@ -873,7 +874,7 @@ def test_trace(x, kw):
873874
# See https://github.com/data-apis/array-api-tests/issues/160
874875
if x.dtype in dh.uint_dtypes:
875876
assert dh.is_int_dtype(res.dtype) # sanity check
876-
else:
877+
elif api_version < "2023.12": # TODO: update dtype assertion for >2023.12 - see #234
877878
ph.assert_dtype("trace", in_dtype=x.dtype, out_dtype=res.dtype, expected=expected_dtype)
878879

879880
n, m = x.shape[-2:]

array_api_tests/test_statistical_functions.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from . import hypothesis_helpers as hh
1212
from . import pytest_helpers as ph
1313
from . import shape_helpers as sh
14-
from . import xps
14+
from . import api_version, xps
1515
from ._array_module import _UndefinedStub
1616
from .typing import DataType
1717

@@ -148,7 +148,7 @@ def test_prod(x, data):
148148
# See https://github.com/data-apis/array-api-tests/issues/106
149149
if x.dtype in dh.uint_dtypes:
150150
assert dh.is_int_dtype(out.dtype) # sanity check
151-
else:
151+
elif api_version < "2023.12": # TODO: update dtype assertion for >2023.12 - see #234
152152
ph.assert_dtype("prod", in_dtype=x.dtype, out_dtype=out.dtype, expected=expected_dtype)
153153
_axes = sh.normalise_axis(kw.get("axis", None), x.ndim)
154154
ph.assert_keepdimable_shape(
@@ -207,7 +207,6 @@ def test_std(x, data):
207207

208208

209209
@pytest.mark.unvectorized
210-
@pytest.mark.skip("flaky") # TODO: fix!
211210
@given(
212211
x=hh.arrays(
213212
dtype=xps.numeric_dtypes(),
@@ -238,7 +237,7 @@ def test_sum(x, data):
238237
# See https://github.com/data-apis/array-api-tests/issues/160
239238
if x.dtype in dh.uint_dtypes:
240239
assert dh.is_int_dtype(out.dtype) # sanity check
241-
else:
240+
elif api_version < "2023.12": # TODO: update dtype assertion for >2023.12 - see #234
242241
ph.assert_dtype("sum", in_dtype=x.dtype, out_dtype=out.dtype, expected=expected_dtype)
243242
_axes = sh.normalise_axis(kw.get("axis", None), x.ndim)
244243
ph.assert_keepdimable_shape(

0 commit comments

Comments
 (0)