[cloud][test] Use pytest conditional imports instead of nose/SkipTest (#22019)

This commit is contained in:
Ryan Brown 2017-03-02 17:07:56 -05:00 committed by GitHub
parent 7b2c013e5a
commit fc0ae5ee6b
4 changed files with 13 additions and 38 deletions

View file

@ -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