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