diff --git a/tests/test_examples.py b/tests/test_examples.py index e5c0381f065..daf3956a259 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -66,3 +66,10 @@ def test_examples(self): model = model_class() for _ in range(10): model.step() + + def test_batch_run(self): + examples_to_test = {"bank_reserves": "batch_run", "sugarscape_g1mt": "run"} + for example, script in examples_to_test.items(): + with self.active_example_dir(example): + script_module = importlib.import_module(script) + script_module.main() # Assuming the scripts have a main function