Skip to content

Commit

Permalink
Merge pull request #16 from yu9824/dev
Browse files Browse the repository at this point in the history
Update tests to skip when torch is not available
  • Loading branch information
yu9824 authored Dec 3, 2023
2 parents f8ed5e3 + 916a72e commit 2df6010
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_gpu_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_gpu_euclidian(prepare_data):
assert np.allclose(distance_X_mean, distance_X_mean_gpu)


@pytest.mark.skipif(device is None, reason="GPU is not available.")
def test_gpu_manhattan(prepare_data):
# 通常の距離行列
X, _ = prepare_data
Expand Down Expand Up @@ -85,6 +86,7 @@ def test_gpu_manhattan(prepare_data):
assert np.allclose(distance_X_mean, distance_X_mean_gpu.cpu().numpy())


@pytest.mark.skipif(device is None, reason="GPU is not available.")
def test_gpu_chebyshev(prepare_data):
# 通常の距離行列
X, _ = prepare_data
Expand Down

0 comments on commit 2df6010

Please sign in to comment.