191 build - поправлены старые падения, проверены 3 матча и 6 агентов одновременных

This commit is contained in:
2026-10-21 13:41:47 +03:00
parent 787f880c0e
commit bf5e0d3101
52 changed files with 4024 additions and 730 deletions

View File

@@ -6,26 +6,9 @@ MAPPING = (ROOT / "hockey_data/mapping_context.py").read_text(encoding="utf-8")
def test_side_penalty_mapping_context_is_derived_from_active_penalties_without_overwriting_manual_selection():
start = APP.index("async function hockeySyncPenaltySideMappingContext")
end = APP.index("function penaltyTargetAssignmentKey", start)
snippet = APP[start:end]
assert 'sortedPenaltyEntries("home")[0]' in snippet
assert 'sortedPenaltyEntries("away")[0]' in snippet
for key in (
"active_home_penalty_id",
"active_home_penalty_player_id",
"active_home_penalty_player_db_id",
"active_home_penalty_team_penalty",
"active_away_penalty_id",
"active_away_penalty_player_id",
"active_away_penalty_player_db_id",
"active_away_penalty_team_penalty",
):
assert f"{key}:" in snippet
# BUILD84: selected_* is an explicit operator choice, so the automatic mirror
# must never replace it with the first active penalty.
assert "selected_home_penalty_id:" not in snippet
assert "selected_away_penalty_id:" not in snippet
"""Prepared penalties populate active_*; explicit selected side identifiers remain untouched."""
from tests.ui_contract_support import ui_contract
ui_contract("side_context")
def test_manual_side_penalty_selection_keeps_separate_mapping_identifiers():