Skip to content

Commit

Permalink
Implement review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
drodarie committed May 21, 2024
1 parent e105f80 commit 896a143
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions tests/test_nest.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ def test_nest_randomness(self):
nest.Connect(A, spikeA)
nest.Simulate(1000.0)
spike_times_nest = spikeA.get("events")["times"]
print(spike_times_nest)

conf = {
"name": "test",
Expand Down Expand Up @@ -426,9 +425,46 @@ def test_nest_randomness(self):
"std": 20.0,
},
)
# Test with an unknown distribution
conf["simulations"]["test"]["cell_models"]["A"]["constants"]["V_m"][
"distribution"
] = "bean"

def test_unknown_distribution(self):
conf = {
"name": "test",
"storage": {"engine": "hdf5"},
"network": {"x": 1, "y": 1, "z": 1},
"partitions": {"B": {"type": "layer", "thickness": 1}},
"cell_types": {"A": {"spatial": {"radius": 1, "count": 1}}},
"placement": {
"placement_A": {
"strategy": "bsb.placement.strategy.FixedPositions",
"cell_types": ["A"],
"partitions": ["B"],
"positions": [[1, 1, 1]],
}
},
"connectivity": {},
"after_connectivity": {},
"simulations": {
"test": {
"simulator": "nest",
"duration": 1000,
"resolution": 0.1,
"cell_models": {
"A": {
"model": "gif_cond_exp",
"constants": {
"I_e": 200.0,
"V_m": {
"distribution": "bean",
"mean": -70,
"std": 20.0,
},
},
}
},
"connection_models": {},
"devices": {},
}
},
}
with self.assertRaises(CastError):
Configuration(conf)

0 comments on commit 896a143

Please sign in to comment.