From 4b86cfef30ccd9352ee93f22dc09435e91d85d0e Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Wed, 19 Feb 2025 09:10:19 -0800 Subject: [PATCH] fix test blocking --- test/test_extension.py | 5 +++-- test/test_nvidia.py | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_extension.py b/test/test_extension.py index c1fe4df..a6ccc50 100644 --- a/test/test_extension.py +++ b/test/test_extension.py @@ -337,7 +337,7 @@ def test_privileged_extension(self): args = p.get_docker_args(mock_cliargs) self.assertTrue('--privileged' in args) - +@pytest.mark.skipif(sys.platform.startswith("win"), reason="User mapping not supported on Windows") class UserExtensionTest(unittest.TestCase): def setUp(self): @@ -351,7 +351,6 @@ def setUp(self): # "em.Error: interpreter stdout proxy lost" em.Interpreter._wasProxyInstalled = False - @pytest.mark.skipif(sys.platform.startswith("win"), "User mapping not supported on Windows") def test_user_extension(self): import pwd @@ -471,6 +470,7 @@ def test_user_collisions(self): dig.clear_image() +@pytest.mark.skipif(sys.platform.startswith("win"), reason="Pulse not supported on Windows") class PulseExtensionTest(unittest.TestCase): def setUp(self): @@ -519,6 +519,7 @@ def test_pulse_extension(self): && apt-get clean """ +@pytest.mark.skipif(sys.platform.startswith("win"), reason="DevHelper not supported on Windows") class DevHelpersExtensionTest(unittest.TestCase): def setUp(self): diff --git a/test/test_nvidia.py b/test/test_nvidia.py index e1ee985..ff462f7 100644 --- a/test/test_nvidia.py +++ b/test/test_nvidia.py @@ -34,7 +34,7 @@ @pytest.mark.docker -@pytest.mark.skipif(sys.platform.startswith("win"), "X11 not supported on Windows") +@pytest.mark.skipif(sys.platform.startswith("win"), reason="X11 not supported on Windows") class X11Test(unittest.TestCase): @classmethod def setUpClass(self): @@ -95,7 +95,6 @@ def test_x11_extension_nocleanup(self): # TODO(tfoote) do more to check that it doesn't actually clean up. # This is more of a smoke test - @pytest.mark.skipif(sys.platform.startswith("win"), "X11 not supported on Windows") def test_no_x11_xpdyinfo(self): for tag in self.dockerfile_tags: dig = DockerImageGenerator([], {}, tag) @@ -114,7 +113,7 @@ def test_x11_xpdyinfo(self): @pytest.mark.docker -@pytest.mark.skipif(sys.platform.startswith("win"), "NVIDIA not supported on Windows") +@pytest.mark.skipif(sys.platform.startswith("win"), reason="NVIDIA not supported on Windows") class NvidiaTest(unittest.TestCase): @classmethod def setUpClass(self):