Skip to content

Commit

Permalink
Mark entire CudaTest class as requiring docker
Browse files Browse the repository at this point in the history
The call to get_docker_client in setUpClass will fail if docker is not
available on the host.
  • Loading branch information
cottsay committed Dec 3, 2024
1 parent 3b21f78 commit f75008d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/test_nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -286,15 +287,13 @@ def setUp(self):
em.Interpreter._wasProxyInstalled = False


@pytest.mark.docker
def test_no_cuda(self):
for tag in self.dockerfile_tags:
dig = DockerImageGenerator([], {}, tag)
self.assertEqual(dig.build(), 0)
self.assertNotEqual(dig.run(), 0)
dig.clear_image()

@pytest.mark.docker
def test_cuda_install(self):
plugins = list_plugins()
desired_plugins = ['cuda']
Expand Down

0 comments on commit f75008d

Please sign in to comment.