mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Skip tests if there is no pytest installed
This commit is contained in:
parent
e183eb2c5a
commit
197586230a
@ -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):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user