feat: complete evidence restructuring worktree
This commit is contained in:
@@ -21,10 +21,40 @@ def test_evidence_authoring_commands_are_distinct_from_runtime_preprocessing():
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert "prepare" in result.output
|
||||
assert "migrate" in result.output
|
||||
assert "resolve" in result.output
|
||||
assert "validate" in result.output
|
||||
|
||||
|
||||
def test_evidence_migrate_json_is_pristine(monkeypatch, tmp_path):
|
||||
from tht.cli import evidence_cmd
|
||||
from tht.evidence import EvidenceMigrationReport
|
||||
|
||||
monkeypatch.setattr(evidence_cmd, "_canonical_worktree", lambda root: root)
|
||||
monkeypatch.setattr(
|
||||
evidence_cmd,
|
||||
"migrate_workspace_evidence",
|
||||
lambda *args, **kwargs: EvidenceMigrationReport(
|
||||
migrated=("evidence:fascia-pediatrica",),
|
||||
unchanged=("evidence:fascia-adulta",),
|
||||
findings=(),
|
||||
),
|
||||
)
|
||||
|
||||
result = CliRunner().invoke(app, ["evidence", "migrate", str(tmp_path), "--json"])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert result.stderr == ""
|
||||
assert json.loads(result.stdout) == {
|
||||
"findings": [],
|
||||
"migrated": ["evidence:fascia-pediatrica"],
|
||||
"operation": "evidence_migrate",
|
||||
"schemaVersion": 1,
|
||||
"status": "migrated",
|
||||
"unchanged": ["evidence:fascia-adulta"],
|
||||
}
|
||||
|
||||
|
||||
def test_evidence_prepare_failure_identifies_the_source_file(monkeypatch, tmp_path):
|
||||
from tht.cli import evidence_cmd
|
||||
from tht.evidence import EvidencePreparationError
|
||||
|
||||
Reference in New Issue
Block a user