|
11 | 11 | from . import hypothesis_helpers as hh
|
12 | 12 | from . import pytest_helpers as ph
|
13 | 13 | from . import shape_helpers as sh
|
14 |
| -from . import xps |
| 14 | +from . import api_version, xps |
15 | 15 | from ._array_module import _UndefinedStub
|
16 | 16 | from .typing import DataType
|
17 | 17 |
|
@@ -148,7 +148,7 @@ def test_prod(x, data):
|
148 | 148 | # See https://github.com/data-apis/array-api-tests/issues/106
|
149 | 149 | if x.dtype in dh.uint_dtypes:
|
150 | 150 | 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 |
152 | 152 | ph.assert_dtype("prod", in_dtype=x.dtype, out_dtype=out.dtype, expected=expected_dtype)
|
153 | 153 | _axes = sh.normalise_axis(kw.get("axis", None), x.ndim)
|
154 | 154 | ph.assert_keepdimable_shape(
|
@@ -207,7 +207,6 @@ def test_std(x, data):
|
207 | 207 |
|
208 | 208 |
|
209 | 209 | @pytest.mark.unvectorized
|
210 |
| -@pytest.mark.skip("flaky") # TODO: fix! |
211 | 210 | @given(
|
212 | 211 | x=hh.arrays(
|
213 | 212 | dtype=xps.numeric_dtypes(),
|
@@ -238,7 +237,7 @@ def test_sum(x, data):
|
238 | 237 | # See https://github.com/data-apis/array-api-tests/issues/160
|
239 | 238 | if x.dtype in dh.uint_dtypes:
|
240 | 239 | 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 |
242 | 241 | ph.assert_dtype("sum", in_dtype=x.dtype, out_dtype=out.dtype, expected=expected_dtype)
|
243 | 242 | _axes = sh.normalise_axis(kw.get("axis", None), x.ndim)
|
244 | 243 | ph.assert_keepdimable_shape(
|
|
0 commit comments