mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -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,17 +1,9 @@
|
|||
from nose.plugins.skip import SkipTest
|
||||
|
||||
try:
|
||||
import boto3
|
||||
import botocore
|
||||
HAS_BOTO3 = True
|
||||
except ImportError:
|
||||
HAS_BOTO3 = False
|
||||
|
||||
if not HAS_BOTO3:
|
||||
raise SkipTest("test_kinesis_stream.py requires the python module 'boto3' and 'botocore'")
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
|
||||
boto3 = pytest.importorskip("boto3")
|
||||
botocore = pytest.importorskip("botocore")
|
||||
|
||||
import ansible.modules.cloud.amazon.kinesis_stream as kinesis_stream
|
||||
|
||||
aws_region = 'us-west-2'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue