(self)
| 1868 | """Test the do-while loop step type.""" |
| 1869 | |
| 1870 | def test_execute_always_runs_once(self): |
| 1871 | from specify_cli.workflows.steps.do_while import DoWhileStep |
| 1872 | from specify_cli.workflows.base import StepContext |
| 1873 | |
| 1874 | step = DoWhileStep() |
| 1875 | ctx = StepContext() |
| 1876 | config = { |
| 1877 | "id": "cycle", |
| 1878 | "condition": "{{ false }}", |
| 1879 | "max_iterations": 3, |
| 1880 | "steps": [{"id": "refine", "command": "speckit.specify"}], |
| 1881 | } |
| 1882 | result = step.execute(config, ctx) |
| 1883 | assert len(result.next_steps) == 1 |
| 1884 | assert result.output["loop_type"] == "do-while" |
| 1885 | assert result.output["condition"] == "{{ false }}" |
| 1886 | |
| 1887 | def test_execute_with_true_condition(self): |
| 1888 | from specify_cli.workflows.steps.do_while import DoWhileStep |
nothing calls this directly
no test coverage detected