Skip to content

Commit 2416dd3

Browse files
akxTitus-von-Koeller
authored andcommitted
Add additional guard for "no NVIDIA driver"
1 parent 62249b4 commit 2416dd3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ def pytest_runtest_call(item):
1313
if str(ae) == "Torch not compiled with CUDA enabled":
1414
pytest.skip("Torch not compiled with CUDA enabled")
1515
raise
16+
except RuntimeError as re:
17+
# CUDA-enabled Torch build, but no CUDA-capable device found
18+
if "Found no NVIDIA driver on your system" in str(re):
19+
pytest.skip("No NVIDIA driver found")
20+
raise
1621

1722

1823
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)