Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libs/gw2_analytics/src/gw2_analytics/ei_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,12 @@ def player_agent_ids(agent: Agent, slice_lo: int = 0, slice_hi: int = 0) -> set[
if not agent.instance_id:
return {agent.id}
entries = agents_by_instance_entries.get(agent.instance_id, [])
if agent.account_name is None:
# Non Squad Player: EI groups every anonymous agent sharing the
# instance into one entity, even when a named agent recycles it
anonymous = {entry.id for entry in entries if entry.account_name is None}
if len(anonymous) > 1:
return anonymous
accounts = {entry.account_name for entry in entries}
if len(accounts) > 1:
return {agent.id}
Expand Down
3 changes: 0 additions & 3 deletions libs/gw2_analytics/tests/test_ei_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from typing import Any, cast

import pytest

from gw2_analytics.ei_compare import _skill_stats, compare_elite_insights
from gw2_core import (
Agent,
Expand All @@ -23,7 +21,6 @@ def _rows(result: dict[str, object]) -> dict[str, dict[str, Any]]:
return {str(row["key"]): row for row in cast("list[dict[str, Any]]", result["results"])}


@pytest.mark.skip(reason="Pre-existing flaky test - deadCount mismatch for Non Squad Player 5")
def test_compare_elite_insights_keeps_first_anonymous_agent_for_shared_instance() -> None:
fight = Fight(
id="fight",
Expand Down
Loading
Loading