diff --git a/test/test_algorithm.py b/test/test_algorithm.py index f41fd824a21171088e900b8c257b994cf5e672e1..b1a37fd1fc9c697eab3fb224f5322f69ff3af8aa 100644 --- a/test/test_algorithm.py +++ b/test/test_algorithm.py @@ -926,6 +926,14 @@ def test_bitonic_sort(ctx_factory, size, dtype): ]) @pytest.mark.bitonic def test_bitonic_argsort(ctx_factory, size, dtype): + import sys + is_pypy = '__pypy__' in sys.builtin_module_names + + if not size and is_pypy: + # https://bitbucket.org/pypy/numpy/issues/53/specifying-strides-on-zero-sized-array + pytest.xfail("pypy doesn't seem to handle as_strided " + "on zero-sized arrays very well") + ctx = cl.create_some_context() queue = cl.CommandQueue(ctx) diff --git a/test/test_wrapper.py b/test/test_wrapper.py index f2b5b645be57c49c74b61c29e48cbfad008c9f05..2bf7d9e8eebc0030ccc44811f3a2660d70e73e20 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -978,6 +978,9 @@ def test_coarse_grain_svm(ctx_factory): def test_fine_grain_svm(ctx_factory): + import sys + is_pypy = '__pypy__' in sys.builtin_module_names + ctx = ctx_factory() queue = cl.CommandQueue(ctx) @@ -992,7 +995,10 @@ def test_fine_grain_svm(ctx_factory): n = 3000 ary = cl.fsvm_empty(ctx, n, np.float32, alignment=64) - assert isinstance(ary.base, cl.SVMAllocation) + + if not is_pypy: + # https://bitbucket.org/pypy/numpy/issues/52 + assert isinstance(ary.base, cl.SVMAllocation) ary.fill(17) orig_ary = ary.copy()