Skip to content

Commit

Permalink
Allow running E2E tests that are skipped in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktorn committed Nov 15, 2023
1 parent 1498696 commit 985569f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/examples/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_tftest_directive(s):


def pytest_generate_tests(metafunc, test_group='example',
filter_tests=lambda x: True):
filter_tests=lambda x: 'skip' not in x):
"""Find all README.md files and collect code examples tagged for testing."""
if test_group in metafunc.fixturenames:
readmes = FABRIC_ROOT.glob('**/README.md')
Expand Down Expand Up @@ -70,8 +70,7 @@ def pytest_generate_tests(metafunc, test_group='example',
index += 1
code = child.children[0].children
tftest_tag = get_tftest_directive(code)
if tftest_tag and ('skip' in tftest_tag or
not filter_tests(tftest_tag)):
if tftest_tag and not filter_tests(tftest_tag):
continue
if child.lang == 'hcl':
path = module.relative_to(FABRIC_ROOT)
Expand Down

0 comments on commit 985569f

Please sign in to comment.