Skip to content

Commit

Permalink
Change from skipping to xfail
Browse files Browse the repository at this point in the history
  • Loading branch information
tberlok committed Feb 29, 2024
1 parent d062e04 commit 46a757f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
14 changes: 9 additions & 5 deletions tests/cuda-gpu/test_gpu_binary_tree.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import pytest

cupy = pytest.importorskip("cupy")
numba = pytest.importorskip("numba")


@pytest.mark.xfail(raises=RuntimeError)
def test_gpu_binary_tree():
import cupy as cp
from numba import cuda
try:
import cupy
import numba
except ImportError:
msg = ("Import of cupy and numba failed "
+ " and GPU-tests can't run.")
pytest.xfail(msg)

import paicos as pa
from scipy.spatial import KDTree
from paicos.trees.bvh_gpu import GpuBinaryTree
Expand Down
11 changes: 8 additions & 3 deletions tests/cuda-gpu/test_gpu_ray_projector.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import pytest

cupy = pytest.importorskip("cupy")
numba = pytest.importorskip("numba")


def test_gpu_ray_projector(show=False):
"""
We compare the CPU and GPU implementations of ray-tracing.
"""
try:
import cupy
import numba
except ImportError:
msg = ("Import of cupy and numba failed "
+ " and GPU-tests can't run.")
pytest.xfail(msg)

import paicos as pa
import numpy as np
pa.use_units(True)
Expand Down
11 changes: 8 additions & 3 deletions tests/cuda-gpu/test_gpu_sph_projector.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import pytest

cupy = pytest.importorskip("cupy")
numba = pytest.importorskip("numba")


def test_gpu_sph_projector(show=False):
"""
We compare the CPU and GPU implementations of SPH-projection.
"""
try:
import cupy
import numba
except ImportError:
msg = ("Import of cupy and numba failed "
+ " and GPU-tests can't run.")
pytest.xfail(msg)

import paicos as pa
import numpy as np
pa.use_units(True)
Expand Down

0 comments on commit 46a757f

Please sign in to comment.