Skip to content

Commit

Permalink
thing
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Sep 20, 2024
1 parent b734ada commit b9d3559
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 42 deletions.
5 changes: 0 additions & 5 deletions mesa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@
import mesa.space as space
import mesa.time as time
from mesa.agent import Agent
from mesa.batchrunner import batch_run
from mesa.datacollection import DataCollector
from mesa.model import Model

__all__ = [
"Model",
"Agent",
"time",
"space",
"DataCollector",
"batch_run",
"experimental",
]

__title__ = "mesa"
Expand Down
15 changes: 6 additions & 9 deletions tests/test_batch_run.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Test Batchrunner."""

import mesa
from mesa.agent import Agent
from mesa.batchrunner import _make_model_kwargs
from mesa.batchrunner import _make_model_kwargs, batch_run
from mesa.datacollection import DataCollector
from mesa.model import Model
from mesa.time import BaseScheduler
Expand Down Expand Up @@ -103,7 +102,7 @@ def step(self): # noqa: D102


def test_batch_run(): # noqa: D103
result = mesa.batch_run(MockModel, {}, number_processes=2)
result = batch_run(MockModel, {}, number_processes=2)
assert result == [
{
"RunId": 0,
Expand Down Expand Up @@ -136,7 +135,7 @@ def test_batch_run(): # noqa: D103


def test_batch_run_with_params(): # noqa: D103
mesa.batch_run(
batch_run(
MockModel,
{
"variable_model_params": range(3),
Expand All @@ -147,9 +146,7 @@ def test_batch_run_with_params(): # noqa: D103


def test_batch_run_no_agent_reporters(): # noqa: D103
result = mesa.batch_run(
MockModel, {"enable_agent_reporters": False}, number_processes=2
)
result = batch_run(MockModel, {"enable_agent_reporters": False}, number_processes=2)
print(result)
assert result == [
{
Expand All @@ -163,11 +160,11 @@ def test_batch_run_no_agent_reporters(): # noqa: D103


def test_batch_run_single_core(): # noqa: D103
mesa.batch_run(MockModel, {}, number_processes=1, iterations=6)
batch_run(MockModel, {}, number_processes=1, iterations=6)


def test_batch_run_unhashable_param(): # noqa: D103
result = mesa.batch_run(
result = batch_run(
MockModel,
{
"n_agents": 2,
Expand Down
28 changes: 0 additions & 28 deletions tests/test_import_namespace.py

This file was deleted.

0 comments on commit b9d3559

Please sign in to comment.