test_workspace_exit_precedence.py python
51 lines 1.2 KB
Raw
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 1 day ago
1 """Unit tests for status exit precedence with workspace relay (§MR.7.2)."""
2
3 from __future__ import annotations
4
5 from cli.commands.status import _exit_code_from_conditions
6
7
8 def test_exit_precedence_includes_workspace_relay() -> None:
9 assert (
10 _exit_code_from_conditions(
11 config_error=False,
12 integrity=None,
13 drift_status="ok",
14 use_exit_code=True,
15 workspace_ok=False,
16 )
17 == 35
18 )
19 # 6 beats 35
20 assert (
21 _exit_code_from_conditions(
22 config_error=False,
23 integrity="mismatch",
24 drift_status="ok",
25 use_exit_code=True,
26 workspace_ok=False,
27 )
28 == 6
29 )
30 # 2 beats 35
31 assert (
32 _exit_code_from_conditions(
33 config_error=True,
34 integrity=None,
35 drift_status="ok",
36 use_exit_code=True,
37 workspace_ok=False,
38 )
39 == 2
40 )
41 # 35 beats 3
42 assert (
43 _exit_code_from_conditions(
44 config_error=False,
45 integrity=None,
46 drift_status="behind",
47 use_exit_code=True,
48 workspace_ok=False,
49 )
50 == 35
51 )
File History 1 commit
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 1 day ago