From b150019a1f66cf39e9e860c95eadacdf6acd8f97 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Tue, 3 Dec 2024 12:30:50 -0600 Subject: [PATCH] Mark entire CudaTest class as requiring docker The call to get_docker_client in setUpClass will fail if docker is not available on the host. --- test/test_nvidia.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_nvidia.py b/test/test_nvidia.py index 6fb7e63..b5ae2de 100644 --- a/test/test_nvidia.py +++ b/test/test_nvidia.py @@ -250,6 +250,7 @@ def test_nvidia_env_subs(self): p.get_environment_subs(mock_cliargs) self.assertEqual(cm.exception.code, 1) +@pytest.mark.docker class CudaTest(unittest.TestCase): @classmethod def setUpClass(self): @@ -286,7 +287,6 @@ def setUp(self): em.Interpreter._wasProxyInstalled = False - @pytest.mark.docker def test_no_cuda(self): for tag in self.dockerfile_tags: dig = DockerImageGenerator([], {}, tag) @@ -294,7 +294,6 @@ def test_no_cuda(self): self.assertNotEqual(dig.run(), 0) dig.clear_image() - @pytest.mark.docker def test_cuda_install(self): plugins = list_plugins() desired_plugins = ['cuda']