11"""Test Batchrunner."""
22
3- import mesa
43from mesa .agent import Agent
5- from mesa .batchrunner import _make_model_kwargs
4+ from mesa .batchrunner import _make_model_kwargs , batch_run
65from mesa .datacollection import DataCollector
76from mesa .model import Model
87from mesa .time import BaseScheduler
@@ -103,7 +102,7 @@ def step(self): # noqa: D102
103102
104103
105104def test_batch_run (): # noqa: D103
106- result = mesa . batch_run (MockModel , {}, number_processes = 2 )
105+ result = batch_run (MockModel , {}, number_processes = 2 )
107106 assert result == [
108107 {
109108 "RunId" : 0 ,
@@ -136,7 +135,7 @@ def test_batch_run(): # noqa: D103
136135
137136
138137def test_batch_run_with_params (): # noqa: D103
139- mesa . batch_run (
138+ batch_run (
140139 MockModel ,
141140 {
142141 "variable_model_params" : range (3 ),
@@ -147,9 +146,7 @@ def test_batch_run_with_params(): # noqa: D103
147146
148147
149148def test_batch_run_no_agent_reporters (): # noqa: D103
150- result = mesa .batch_run (
151- MockModel , {"enable_agent_reporters" : False }, number_processes = 2
152- )
149+ result = batch_run (MockModel , {"enable_agent_reporters" : False }, number_processes = 2 )
153150 print (result )
154151 assert result == [
155152 {
@@ -163,11 +160,11 @@ def test_batch_run_no_agent_reporters(): # noqa: D103
163160
164161
165162def test_batch_run_single_core (): # noqa: D103
166- mesa . batch_run (MockModel , {}, number_processes = 1 , iterations = 6 )
163+ batch_run (MockModel , {}, number_processes = 1 , iterations = 6 )
167164
168165
169166def test_batch_run_unhashable_param (): # noqa: D103
170- result = mesa . batch_run (
167+ result = batch_run (
171168 MockModel ,
172169 {
173170 "n_agents" : 2 ,
0 commit comments