Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def find_all_test_playbooks():

ALL_TEST_PLAYBOOKS = list(find_all_test_playbooks())
TEST_PLAYBOOKS = sorted([playbook for playbook in ALL_TEST_PLAYBOOKS if not playbook.startswith('inventory_plugin')])
INVENTORY_PLAYBOOKS = sorted(set(ALL_TEST_PLAYBOOKS) - set(TEST_PLAYBOOKS))
TEST_PLAYBOOKS_SET = set(TEST_PLAYBOOKS)
INVENTORY_PLAYBOOKS = sorted(set(ALL_TEST_PLAYBOOKS) - TEST_PLAYBOOKS_SET)


def pytest_addoption(parser):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_crud(tmpdir, module, vcrmode):

@pytest.mark.parametrize('module', TEST_PLAYBOOKS)
def test_check_mode(tmpdir, module):
if module in ['subscription_manifest', 'templates_import', 'puppetclasses_import']:
if module in {'subscription_manifest', 'templates_import', 'puppetclasses_import'}:
pytest.skip("This module does not support check_mode.")
run = run_playbook_vcr(tmpdir, module, check_mode=True)
assert run.rc == 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import py.path
import pytest

from .conftest import TEST_PLAYBOOKS
from .conftest import TEST_PLAYBOOKS_SET

MODULES_PATH = py.path.local(__file__).realpath() / '..' / '..' / 'plugins' / 'modules'

Expand All @@ -22,7 +22,7 @@ def _module_file_path(module):


def _module_is_tested(module):
return module in TEST_PLAYBOOKS
return module in TEST_PLAYBOOKS_SET


@pytest.mark.parametrize('module', ALL_MODULES)
Expand Down