Align tftest syntax with tdoc

This commit changes the token separator for inline examples from a
semicolon to a space
This commit is contained in:
Julio Castillo
2022-01-28 20:15:35 +01:00
committed by Julio Castillo
parent b11367e970
commit cf423998f0
45 changed files with 140 additions and 140 deletions

View File

@@ -38,7 +38,7 @@ def pytest_generate_tests(metafunc):
if isinstance(child, marko.block.FencedCode) and child.lang == 'hcl':
index += 1
code = child.children[0].children
if 'tftest:skip' in code:
if 'tftest skip' in code:
continue
examples.append(code)
ids.append(f'{module.stem}:example{index}')

View File

@@ -17,7 +17,7 @@ from pathlib import Path
BASE_PATH = Path(__file__).parent
EXPECTED_RESOURCES_RE = re.compile(r'# tftest:modules=(\d+):resources=(\d+)')
EXPECTED_RESOURCES_RE = re.compile(r'# tftest modules=(\d+) resources=(\d+)')
def test_example(example_plan_runner, tmp_path, example):