gabriel / muse public
test_conflicts_envelope.py python
31 lines 959 B
Raw
sha256:a317886dc0496c4af7b285b3e41c86c4c34ea2e79afc63b8829aadb1ada7903f chore: bump version to 0.2.0rc15 to match musehub#113 fix release Sonnet 4.6 patch 63 days ago
1 """Envelope tests for conflicts command."""
2 from __future__ import annotations
3 from collections.abc import Mapping
4 import json
5 import tempfile
6 import pathlib
7 import pytest
8 from tests.cli_test_helper import CliRunner
9
10 runner = CliRunner()
11
12 _FIELDS = ("muse_version", "schema", "timestamp", "warnings")
13
14
15 def _check(d: Mapping[str, object]) -> None:
16 for f in _FIELDS:
17 assert f in d, f"missing {f}"
18 assert "schema_version" not in d
19
20
21 class TestConflictsEnvelope:
22 def test_conflicts_no_merge_has_envelope(self) -> None:
23 # Run in a fresh repo so no stale MERGE_STATE.json can bleed in
24 with tempfile.TemporaryDirectory() as tmp:
25 repo = pathlib.Path(tmp)
26 runner.invoke(None, ["init"], cwd=repo)
27 r = runner.invoke(None, ["conflicts", "--json"], cwd=repo)
28 assert r.exit_code == 0, r.output
29 d = json.loads(r.output)
30 _check(d)
31 assert d["merge_in_progress"] is False
File History 2 commits
sha256:a317886dc0496c4af7b285b3e41c86c4c34ea2e79afc63b8829aadb1ada7903f chore: bump version to 0.2.0rc15 to match musehub#113 fix release Sonnet 4.6 patch 63 days ago
sha256:f3b726b50f0aee3622bba751e0a67aa7ae4cf75a798477dbce581940b6a9cf70 feat: migrate invariants cache to .muse/cache/invariants.ms… Sonnet 4.6 patch 130 days ago