Skip to content

Commit

Permalink
Update tests to skip when torch is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
yu9824 committed Dec 3, 2023
1 parent d840335 commit 916a72e
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 916a72e

Please sign in to comment.