搭 workspaces/alpha + workspaces/beta 两个库,激活 alpha。
(tmp_path, monkeypatch)
| 21 | |
| 22 | @pytest.fixture |
| 23 | def fake_workspaces(tmp_path, monkeypatch): |
| 24 | """搭 workspaces/alpha + workspaces/beta 两个库,激活 alpha。""" |
| 25 | for name in ("alpha", "beta"): |
| 26 | (tmp_path / "workspaces" / name / "wiki").mkdir(parents=True) |
| 27 | (tmp_path / "workspaces" / name / "raw").mkdir(parents=True) |
| 28 | ws = tmp_path / "workspaces" / "alpha" |
| 29 | monkeypatch.setattr(k, "DATA_ROOT", tmp_path) |
| 30 | monkeypatch.setattr(k, "PROJECT_ROOT", ws) |
| 31 | monkeypatch.setattr(k, "WIKI_DIR", ws / "wiki") |
| 32 | monkeypatch.setattr(k, "RAW_DIR", ws / "raw") |
| 33 | return tmp_path |
| 34 | |
| 35 | |
| 36 | class TestStripWorkspacePrefix: |
nothing calls this directly
no outgoing calls
no test coverage detected