Skip to content

Commit 1d9bd0d

Browse files
committed
fix tests.
1 parent 944ad69 commit 1d9bd0d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/tests_pytorch/accelerators/test_gpu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,5 @@ def test_gpu_device_name():
7979
assert torch.cuda.get_device_name(0) == CUDAAccelerator.device_name()
8080

8181

82-
def test_gpu_device_name_no_gpu():
83-
with mock.patch("torch.cuda.is_available", return_value=False):
84-
assert str(False) == CUDAAccelerator.device_name()
82+
def test_gpu_device_name_no_gpu(cuda_count_0):
83+
assert str(False) == CUDAAccelerator.device_name()

0 commit comments

Comments
 (0)