mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
skip test when no s3 lib
This commit is contained in:
parent
f0a6f1637b
commit
788a0d1b9e
1 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,12 @@ import pytest
|
|||
|
||||
import unittest
|
||||
|
||||
import ansible.modules.cloud.amazon.s3 as s3
|
||||
try:
|
||||
import ansible.modules.cloud.amazon.s3 as s3
|
||||
except ImportError:
|
||||
from nose.plugins.skip import SkipTest
|
||||
raise SkipTest("This test requires the s3 Python libraries")
|
||||
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
|
||||
boto3 = pytest.importorskip("boto3")
|
||||
|
|
Loading…
Reference in a new issue