45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
|
|
"""AP1.2 — Snapshot signals without operating_phase."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from steering.signals.snapshot_signals import derive_initiative_signals
|
||
|
|
|
||
|
|
|
||
|
|
def test_derive_signals_backlog_awaiting_commit():
|
||
|
|
signals = derive_initiative_signals(
|
||
|
|
initiative_status="active",
|
||
|
|
open_actions=0,
|
||
|
|
blocked_actions=0,
|
||
|
|
review_required_actions=0,
|
||
|
|
open_blockers=0,
|
||
|
|
backlog_new=3,
|
||
|
|
planned_reviews_due=0,
|
||
|
|
)
|
||
|
|
assert signals == ["backlog_awaiting_commit"]
|
||
|
|
|
||
|
|
|
||
|
|
def test_derive_signals_work_in_progress():
|
||
|
|
signals = derive_initiative_signals(
|
||
|
|
initiative_status="active",
|
||
|
|
open_actions=2,
|
||
|
|
blocked_actions=0,
|
||
|
|
review_required_actions=0,
|
||
|
|
open_blockers=0,
|
||
|
|
backlog_new=0,
|
||
|
|
planned_reviews_due=0,
|
||
|
|
)
|
||
|
|
assert signals == ["work_in_progress"]
|
||
|
|
|
||
|
|
|
||
|
|
def test_derive_signals_terminal():
|
||
|
|
signals = derive_initiative_signals(
|
||
|
|
initiative_status="completed",
|
||
|
|
open_actions=0,
|
||
|
|
blocked_actions=0,
|
||
|
|
review_required_actions=0,
|
||
|
|
open_blockers=0,
|
||
|
|
backlog_new=0,
|
||
|
|
planned_reviews_due=0,
|
||
|
|
)
|
||
|
|
assert signals == ["initiative_terminal"]
|