(self, project_dir)
| 5113 | |
| 5114 | @pytest.mark.skipif(not hasattr(os, "symlink"), reason="symlinks are unavailable") |
| 5115 | def test_skip_symlinked_step_files(self, project_dir): |
| 5116 | from specify_cli.workflows import load_custom_steps |
| 5117 | |
| 5118 | step_dir = project_dir / ".specify" / "workflows" / "steps" / "bad-symlinked-files" |
| 5119 | step_dir.mkdir(parents=True) |
| 5120 | |
| 5121 | outside = project_dir.parent / "outside-step-files" |
| 5122 | outside.mkdir(parents=True, exist_ok=True) |
| 5123 | step_yml_target = outside / "step.yml" |
| 5124 | step_yml_target.write_text("step:\n type_key: bad-symlinked-files\n", encoding="utf-8") |
| 5125 | init_target = outside / "__init__.py" |
| 5126 | init_target.write_text("# external code", encoding="utf-8") |
| 5127 | |
| 5128 | (step_dir / "step.yml").symlink_to(step_yml_target) |
| 5129 | (step_dir / "__init__.py").symlink_to(init_target) |
| 5130 | |
| 5131 | loaded = load_custom_steps(project_dir) |
| 5132 | assert "bad-symlinked-files" not in loaded |
| 5133 | |
| 5134 | def test_skip_already_registered(self, project_dir): |
| 5135 | from specify_cli.workflows import load_custom_steps |
nothing calls this directly
no test coverage detected