Print dry run output showing what would be rendered.
(plain_source_tree: dict, render_range: Optional[list[str]])
| 7 | |
| 8 | |
| 9 | def print_dry_run_output(plain_source_tree: dict, render_range: Optional[list[str]]): |
| 10 | """Print dry run output showing what would be rendered.""" |
| 11 | frid = plain_spec.get_first_frid(plain_source_tree) |
| 12 | |
| 13 | while frid is not None: |
| 14 | is_inside_range = render_range is None or frid in render_range |
| 15 | |
| 16 | if is_inside_range: |
| 17 | specifications, _ = plain_spec.get_specifications_for_frid(plain_source_tree, frid) |
| 18 | functional_requirement_text = specifications[plain_spec.FUNCTIONAL_REQUIREMENTS][-1] |
| 19 | console.info( |
| 20 | "-------------------------------------\n" |
| 21 | f"Rendering functionality {frid}:\n" |
| 22 | f"{functional_requirement_text}\n" |
| 23 | "-------------------------------------\n" |
| 24 | ) |
| 25 | if plain_spec.ACCEPTANCE_TESTS in specifications: |
| 26 | for i, acceptance_test in enumerate(specifications[plain_spec.ACCEPTANCE_TESTS], 1): |
| 27 | console.info(f"Generating acceptance test #{i}:\n\n{acceptance_test}\n") |
| 28 | else: |
| 29 | console.info( |
| 30 | "-------------------------------------\n" |
| 31 | f"Skipping rendering iteration: {frid}\n" |
| 32 | "-------------------------------------" |
| 33 | ) |
| 34 | |
| 35 | frid = plain_spec.get_next_frid(plain_source_tree, frid) |
no test coverage detected