Skip tests if there is no pytest installed

This commit is contained in:
Bo Maryniuk 2018-01-30 17:03:58 +01:00
parent e183eb2c5a
commit 197586230a

View File

@ -16,12 +16,17 @@ from tests.support.mock import (
NO_MOCK,
NO_MOCK_REASON
)
try:
import pytest
except ImportError as import_error:
pytest = None
# Import Salt Libs
import salt.modules.localemod as localemod
from salt.exceptions import CommandExecutionError
@skipIf(not pytest, False)
@skipIf(NO_MOCK, NO_MOCK_REASON)
class LocalemodTestCase(TestCase, LoaderModuleMockMixin):
'''