Skip to content

Commit

Permalink
test: fix unitetest using regions instead of simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
filimarc committed Dec 2, 2024
1 parent 625a53e commit a4c711e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,24 +1613,24 @@ def test_updates(self):
"""Test if tree is updated correctly"""
cfg = Configuration.default()
cfg.morphologies = ["dummy_neuron.swc"]
cfg.simulations.add(
"neuronsim",
simulator="neuron",
resolution=0.025,
duration=1,
temperature=32,
cell_models={},
connection_models={},
devices={},
cfg.partitions.add("base_layer", thickness=100)
cfg.partitions.add("top_layer", thickness=100)
cfg.regions.add(
"brain_region",
type="stack",
children=[
"base_layer",
"top_layer",
],
)
cfg_dict = cfg.__tree__()
self.assertEqual(cfg_dict["morphologies"], ["dummy_neuron.swc"])
self.assertEqual(cfg_dict["simulations"]["neuronsim"]["simulator"], "neuron")
self.assertIn("brain_region", cfg_dict["regions"])
cfg.morphologies = []
cfg.simulations.pop("neuronsim")
cfg.regions.pop("brain_region")
cfg_dict = cfg.__tree__()
self.assertEqual(cfg_dict["morphologies"], [])
self.assertEqual(cfg_dict["simulations"], {})
self.assertEqual(cfg_dict["regions"], {})


class TestNodeClass(unittest.TestCase):
Expand Down

0 comments on commit a4c711e

Please sign in to comment.