Skip to content

Commit a1c0189

Browse files
authored
test_examples.py: Add batch_run tests
1 parent df3b9e0 commit a1c0189

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test_examples.py

+13
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,16 @@ def test_model_steps(model_class):
3232
model = model_class() # Assume no arguments are needed
3333
for _ in range(10):
3434
model.step()
35+
36+
37+
def get_batch_scripts():
38+
return [
39+
'examples.bank_reserves.batch_run',
40+
'examples.sugarscape_g1mt.run'
41+
]
42+
43+
44+
@pytest.mark.parametrize("script_module", get_batch_scripts())
45+
def test_batch_run(script_module):
46+
module = importlib.import_module(script_module)
47+
module.main() # Call the main function

0 commit comments

Comments
 (0)