diff --git a/test/t/test_service.py b/test/t/test_service.py index 8e7fb059826..b7daf008fc0 100644 --- a/test/t/test_service.py +++ b/test/t/test_service.py @@ -8,6 +8,14 @@ class TestService: sys.platform == "darwin", reason="Service completion not available on macOS", ) - @pytest.mark.complete("service ") + @pytest.mark.complete( + "service ", + # Skip if we don't have a way to find services + skipif="! (type systemctl || type service || type initctl || " + "[[ -d /etc/rc.d/init.d || " + "-d /etc/init.d || " + "-d /etc/xinetd.d || " + "-f /etc/slackware-version ]])", + ) def test_1(self, completion): assert completion