mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
[cloud][test] Use pytest conditional imports instead of nose/SkipTest (#22019)
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user