From 2416dd3693fc2f1aa93fe300b71bf14eb1184aa9 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Fri, 8 Mar 2024 17:37:38 +0200 Subject: [PATCH] Add additional guard for "no NVIDIA driver" --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 7aee8c922..17ffd281c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,6 +13,11 @@ def pytest_runtest_call(item): if str(ae) == "Torch not compiled with CUDA enabled": pytest.skip("Torch not compiled with CUDA enabled") raise + except RuntimeError as re: + # CUDA-enabled Torch build, but no CUDA-capable device found + if "Found no NVIDIA driver on your system" in str(re): + pytest.skip("No NVIDIA driver found") + raise @pytest.fixture(scope="session")