test_workspace_exit_precedence.py python
51 lines 1.2 KB
Raw
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 8 days 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 2 commits
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 8 days ago
sha256:c87cf2c2f03da507f66f93922cb339a2cbebb33ad6372a6039032fb09a20da12 Reconcile reviewed Overseer recovery d47291d5d9030de5ebef71… Human minor ⚠ 9 days ago