Skip to content

Commit

Permalink
Merge branch 'test-randomactivation' of https://github.com/EwoutH/mesa
Browse files Browse the repository at this point in the history
…into test-randomactivation
  • Loading branch information
quaquel committed Jan 26, 2024
2 parents 3abd882 + 6c2c5ad commit ef31723
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,12 @@ def test_agentset_select_by_type():
all_agents = agentset.select()
assert len(all_agents) == len(mixed_agents)


def test_agentset_shuffle():
model = Model()
test_agents = [TestAgent(model.next_id(), model) for _ in range(4)]

agentset = AgentSet(test_agents, model=model)

agentset = agentset.shuffle()
assert not all(a1 == a2 for a1, a2 in zip(test_agents, agentset))

Expand Down

0 comments on commit ef31723

Please sign in to comment.