test_checkout_symbol_envelope.py
python
sha256:a73c3f57b665e8c0be2c9e977b3ebefdb7ae8d46f196986d911c6a8f5d8b8d49
docs: update store.py references to focused module paths
Sonnet 4.6
28 days ago
| 1 | """Envelope tests for checkout-symbol command.""" |
| 2 | from __future__ import annotations |
| 3 | from collections.abc import Mapping |
| 4 | import json |
| 5 | import pytest |
| 6 | from tests.cli_test_helper import CliRunner |
| 7 | |
| 8 | runner = CliRunner() |
| 9 | |
| 10 | _FIELDS = ("muse_version", "schema", "timestamp", "warnings") |
| 11 | |
| 12 | |
| 13 | def _check(d: Mapping[str, object]) -> None: |
| 14 | for f in _FIELDS: |
| 15 | assert f in d, f"missing {f}" |
| 16 | assert "schema_version" not in d |
| 17 | |
| 18 | |
| 19 | class TestCheckoutSymbolEnvelope: |
| 20 | def test_checkout_symbol_dry_run_has_envelope(self) -> None: |
| 21 | r = runner.invoke(None, [ |
| 22 | "code", "checkout-symbol", |
| 23 | "muse/cli/commands/cat.py::run", |
| 24 | "--commit", "dev", |
| 25 | "--dry-run", "--json", |
| 26 | ]) |
| 27 | assert r.exit_code == 0, r.output |
| 28 | _check(json.loads(r.output)) |
File History
2 commits
sha256:a73c3f57b665e8c0be2c9e977b3ebefdb7ae8d46f196986d911c6a8f5d8b8d49
docs: update store.py references to focused module paths
Sonnet 4.6
28 days ago
sha256:b6cae4448122b2cc690d913be26f7e0a539f11855b8d288bd48be43eb532b5b2
refactor: migrate all source callers off muse.core.store re…
Sonnet 4.6
minor
⚠
28 days ago