mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-14 17:10:51 -07:00
[cloud][test] Use pytest conditional imports instead of nose/SkipTest (#22019)
This commit is contained in:
parent
7b2c013e5a
commit
fc0ae5ee6b
4 changed files with 13 additions and 38 deletions
|
@ -1,13 +1,5 @@
|
|||
from nose.plugins.skip import SkipTest
|
||||
|
||||
try:
|
||||
import boto
|
||||
HAS_BOTO = True
|
||||
except ImportError:
|
||||
HAS_BOTO = False
|
||||
|
||||
if not HAS_BOTO:
|
||||
raise SkipTest("test_s3.py requires the python module 'boto'")
|
||||
import pytest
|
||||
boto = pytest.importorskip("boto")
|
||||
|
||||
import unittest
|
||||
import ansible.modules.cloud.amazon.s3 as s3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue