mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
use importorskip
This commit is contained in:
parent
ed345d06e7
commit
025b3f073e
1 changed files with 1 additions and 10 deletions
|
@ -4,16 +4,7 @@ import pytest
|
|||
|
||||
import salt.utils.x509 as x509
|
||||
|
||||
try:
|
||||
import cryptography.x509 as cx509
|
||||
|
||||
HAS_LIBS = True
|
||||
except ImportError:
|
||||
HAS_LIBS = False
|
||||
|
||||
pytestmark = [
|
||||
pytest.mark.skipif(HAS_LIBS is False, reason="Needs cryptography library")
|
||||
]
|
||||
cx509 = pytest.importorskip("cryptography.x509")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Add table
Reference in a new issue