MCPcopy Index your code
hub / github.com/github/spec-kit / test_execute_condition_true

Method test_execute_condition_true

tests/test_workflows.py:1809–1825  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1807 """Test the while loop step type."""
1808
1809 def test_execute_condition_true(self):
1810 from specify_cli.workflows.steps.while_loop import WhileStep
1811 from specify_cli.workflows.base import StepContext
1812
1813 step = WhileStep()
1814 ctx = StepContext(
1815 steps={"run-tests": {"output": {"exit_code": 1}}}
1816 )
1817 config = {
1818 "id": "retry",
1819 "condition": "{{ steps.run-tests.output.exit_code != 0 }}",
1820 "max_iterations": 5,
1821 "steps": [{"id": "fix", "command": "speckit.implement"}],
1822 }
1823 result = step.execute(config, ctx)
1824 assert result.output["condition_result"] is True
1825 assert len(result.next_steps) == 1
1826
1827 def test_execute_condition_false(self):
1828 from specify_cli.workflows.steps.while_loop import WhileStep

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
WhileStepClass · 0.90
StepContextClass · 0.90

Tested by

no test coverage detected