Skip to content

test: add coverage for ignore_missing=True in DataCollector#3054

Merged
quaquel merged 3 commits intomesa:mainfrom
disgruntled-penguin:test/datacollector-ignore-missing
Jan 5, 2026
Merged

test: add coverage for ignore_missing=True in DataCollector#3054
quaquel merged 3 commits intomesa:mainfrom
disgruntled-penguin:test/datacollector-ignore-missing

Conversation

@disgruntled-penguin
Copy link
Copy Markdown
Contributor

This PR adds a test case to tests/test_datacollector.py to improve coverage for the DataCollector class.

  • Added test_collect_with_missing_agent_vars to verify that ignore_missing=True correctly handles agents missing specific variables without raising an error.
  • Verifies that ignore_missing=False (default) correctly raises an AttributeError when variables are missing.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 2, 2026

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +4.4% [+3.7%, +5.1%] 🔵 +0.3% [+0.2%, +0.4%]
BoltzmannWealth large 🔵 +0.2% [-0.7%, +1.2%] 🔵 -1.5% [-8.0%, +4.8%]
Schelling small 🔵 +0.4% [-1.2%, +2.2%] 🔵 +1.2% [+0.1%, +2.3%]
Schelling large 🔵 +0.5% [+0.2%, +0.8%] 🔵 +1.1% [+0.2%, +2.1%]
WolfSheep small 🔵 +0.6% [+0.5%, +0.8%] 🔵 +0.3% [+0.2%, +0.4%]
WolfSheep large 🔵 +2.8% [-4.6%, +11.4%] 🔵 +1.3% [-0.8%, +3.6%]
BoidFlockers small 🔵 -0.3% [-0.7%, +0.1%] 🔵 -1.9% [-2.0%, -1.9%]
BoidFlockers large 🔵 -0.6% [-0.9%, -0.3%] 🔵 -1.6% [-1.7%, -1.4%]

@quaquel quaquel added the testing Release notes label label Jan 2, 2026
@quaquel quaquel merged commit 29ba4eb into mesa:main Jan 5, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants