We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 944ad69 commit 1d9bd0dCopy full SHA for 1d9bd0d
tests/tests_pytorch/accelerators/test_gpu.py
@@ -79,6 +79,5 @@ def test_gpu_device_name():
79
assert torch.cuda.get_device_name(0) == CUDAAccelerator.device_name()
80
81
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()
+def test_gpu_device_name_no_gpu(cuda_count_0):
+ assert str(False) == CUDAAccelerator.device_name()
0 commit comments