MCPcopy Create free account
hub / github.com/Qinbf/groundmap / fake_workspaces

Function fake_workspaces

scripts/tests/test_k_workspace_cli.py:23–33  ·  view source on GitHub ↗

搭 workspaces/alpha + workspaces/beta 两个库,激活 alpha。

(tmp_path, monkeypatch)

Source from the content-addressed store, hash-verified

21
22@pytest.fixture
23def 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
36class TestStripWorkspacePrefix:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected