Skip to main content

✅ Get local demons includes both sides

CategoryRegression
StatusPassing
Testtests/test_targeting.py::test_get_local_demons_includes_both_sides

Regression: Confusion #21 — get_local_demons returns both sides (friendly fire).

Preconditions

  • Lane 0: P1's Duban (#001), P2's Gusion (#105).

  • Lane 1: P1's Andras (#093).

Action

  • get_local_demons(state, lane=0)
result = get_local_demons(state, 0)
result_ids = {d.unit_id for d in result}

Expected Postconditions

  • Result contains Duban and Gusion (both lane 0 — BOTH players).

  • Result does NOT contain Andras (lane 1).

  • Length of result is 2.

Assertions

assert len(result) == 2
assert "001" in result_ids # Duban — P1
assert "105" in result_ids # Gusion — P2
assert "093" not in result_ids # Andras — different lane