diff --git a/mesa/experimental/devs/simulator.py b/mesa/experimental/devs/simulator.py index 9445e189b6c..57749f038f4 100644 --- a/mesa/experimental/devs/simulator.py +++ b/mesa/experimental/devs/simulator.py @@ -109,7 +109,7 @@ def run_until(self, end_time: int | float) -> None: self._schedule_event(event) # reschedule event break - def step(self): + def run_next_event(self): """Execute the next event. Raises: diff --git a/tests/test_devs.py b/tests/test_devs.py index 5788235a940..883a74d1375 100644 --- a/tests/test_devs.py +++ b/tests/test_devs.py @@ -62,15 +62,15 @@ def test_devs_simulator(): fn = MagicMock() simulator.schedule_event_absolute(fn, 1.0) - simulator.step() + simulator.run_next_event() fn.assert_called_once() assert simulator.time == 1.0 - simulator.step() + simulator.run_next_event() assert simulator.time == 1.0 simulator = DEVSimulator() with pytest.raises(Exception): - simulator.step() + simulator.run_next_event() # cancel_event simulator = DEVSimulator()