diff --git a/tests/pytests/integration/runners/test_nacl.py b/tests/pytests/integration/runners/test_nacl.py index 3dc9266f0bbb..5e4688a79c8c 100644 --- a/tests/pytests/integration/runners/test_nacl.py +++ b/tests/pytests/integration/runners/test_nacl.py @@ -8,13 +8,21 @@ import salt.utils.stringutils from tests.support.mock import patch -pytest.importorskip("libnacl") - pytestmark = [ pytest.mark.windows_whitelisted, ] +try: + import salt.runners.nacl as nacl + + HAS_PYNACL = True +except (ImportError, OSError, AttributeError): + HAS_PYNACL = False + +@pytest.mark.skipif( + not HAS_PYNACL, reason="skipping test_nacl, reason=PyNaCl is unavailable" +) @pytest.fixture(scope="module") def minion_opts(): return salt.config.minion_config(None)