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

Method test_execute_simple_workflow

tests/test_workflows.py:2760–2790  ·  view source on GitHub ↗
(self, project_dir)

Source from the content-addressed store, hash-verified

2758 engine.load_workflow("nonexistent")
2759
2760 def test_execute_simple_workflow(self, project_dir):
2761 from unittest.mock import patch
2762 from specify_cli.workflows.engine import WorkflowEngine, WorkflowDefinition
2763 from specify_cli.workflows.base import RunStatus
2764
2765 yaml_str = """
2766schema_version: "1.0"
2767workflow:
2768 id: "simple"
2769 name: "Simple"
2770 version: "1.0.0"
2771 integration: claude
2772inputs:
2773 name:
2774 type: string
2775 default: "test"
2776steps:
2777 - id: step-one
2778 command: speckit.specify
2779 input:
2780 args: "{{ inputs.name }}"
2781"""
2782 definition = WorkflowDefinition.from_string(yaml_str)
2783 engine = WorkflowEngine(project_dir)
2784 with patch("specify_cli.workflows.steps.command.shutil.which", return_value=None):
2785 state = engine.execute(definition, {"name": "login"})
2786
2787 assert state.status == RunStatus.FAILED
2788 assert "step-one" in state.step_results
2789 assert state.step_results["step-one"]["output"]["command"] == "speckit.specify"
2790 assert state.step_results["step-one"]["output"]["input"]["args"] == "login"
2791
2792 def test_execute_with_gate_pauses(self, project_dir):
2793 from specify_cli.workflows.engine import WorkflowEngine, WorkflowDefinition

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
WorkflowEngineClass · 0.90
from_stringMethod · 0.80

Tested by

no test coverage detected