From ddc5959ffc1ff8c95b57dd4b507320d17b9f2165 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sat, 14 Sep 2024 21:04:58 +0200 Subject: [PATCH] yet more tests --- mesa/model.py | 5 +++++ tests/test_time.py | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mesa/model.py b/mesa/model.py index ffdd2e7c16f..75f1f536119 100644 --- a/mesa/model.py +++ b/mesa/model.py @@ -18,6 +18,11 @@ from mesa.datacollection import DataCollector +class BaseClass: + def __init__(self, seed=None): + super().__init__() + self.seed = seed + class Model: """Base class for models in the Mesa ABM library. diff --git a/tests/test_time.py b/tests/test_time.py index 0aef876ece0..341a0c3a1a2 100644 --- a/tests/test_time.py +++ b/tests/test_time.py @@ -13,6 +13,7 @@ SimultaneousActivation, StagedActivation, ) +from mesa.model import BaseClass RANDOM = "random" STAGED = "staged" @@ -102,10 +103,7 @@ def model_stage(self): self.log.append("model_stage") -class BaseClass: - def __init__(self, seed=None): - super().__init__() - self.seed = seed + class SomeModel(BaseClass):