(self, project_dir)
| 5058 | assert loaded == [] |
| 5059 | |
| 5060 | def test_load_valid_custom_step(self, project_dir): |
| 5061 | from specify_cli.workflows import load_custom_steps, STEP_REGISTRY |
| 5062 | |
| 5063 | step_dir = project_dir / ".specify" / "workflows" / "steps" / "test-custom" |
| 5064 | step_dir.mkdir(parents=True) |
| 5065 | |
| 5066 | step_yml = """ |
| 5067 | schema_version: "1.0" |
| 5068 | step: |
| 5069 | type_key: "test-custom" |
| 5070 | name: "Test Custom Step" |
| 5071 | version: "1.0.0" |
| 5072 | author: "test" |
| 5073 | description: "A test custom step" |
| 5074 | """ |
| 5075 | (step_dir / "step.yml").write_text(step_yml, encoding="utf-8") |
| 5076 | |
| 5077 | init_py = """ |
| 5078 | from specify_cli.workflows.base import StepBase, StepResult |
| 5079 | |
| 5080 | class TestCustomStep(StepBase): |
| 5081 | type_key = "test-custom" |
| 5082 | |
| 5083 | def execute(self, config, context): |
| 5084 | return StepResult() |
| 5085 | """ |
| 5086 | (step_dir / "__init__.py").write_text(init_py, encoding="utf-8") |
| 5087 | |
| 5088 | loaded = load_custom_steps(project_dir) |
| 5089 | assert "test-custom" in loaded |
| 5090 | assert "test-custom" in STEP_REGISTRY |
| 5091 | |
| 5092 | def test_skip_missing_step_yml(self, project_dir): |
| 5093 | from specify_cli.workflows import load_custom_steps |
nothing calls this directly
no test coverage detected