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

Method test_validate_invalid_max_iterations

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

Source from the content-addressed store, hash-verified

1851 # max_iterations is optional (defaults to 10)
1852
1853 def test_validate_invalid_max_iterations(self):
1854 from specify_cli.workflows.steps.while_loop import WhileStep
1855
1856 step = WhileStep()
1857 errors = step.validate({"id": "test", "condition": "{{ true }}", "max_iterations": 0, "steps": []})
1858 assert any("must be an integer >= 1" in e for e in errors)
1859 # bool is an int subclass; `max_iterations: true` must be rejected, not
1860 # silently treated as a single iteration.
1861 bool_errors = step.validate(
1862 {"id": "test", "condition": "{{ true }}", "max_iterations": True, "steps": []}
1863 )
1864 assert any("must be an integer >= 1" in e for e in bool_errors)
1865
1866
1867class TestDoWhileStep:

Callers

nothing calls this directly

Calls 2

validateMethod · 0.95
WhileStepClass · 0.90

Tested by

no test coverage detected