Skip to content

Commit 822ec75

Browse files
author
Andrew Davison
committed
Regression test for #622
1 parent 3392560 commit 822ec75

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

test/system/scenarios/test_connectors.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,29 @@ def issue309(sim):
201201
sim.end()
202202

203203

204+
@register()
205+
def issue622(sim):
206+
sim.setup()
207+
pop = sim.Population(10, sim.IF_cond_exp, {}, label="pop")
208+
209+
view1 = sim.PopulationView(pop , [2,3,4])
210+
view2 = sim.PopulationView(pop , [2,3,4])
211+
212+
proj1 = sim.Projection(view1, view2, sim.AllToAllConnector(allow_self_connections = False), sim.StaticSynapse(
213+
weight=0.015, delay=1.0), receptor_type='excitatory')
214+
proj2 = sim.Projection(view1, view1, sim.AllToAllConnector(allow_self_connections = False), sim.StaticSynapse(
215+
weight=0.015, delay=1.0), receptor_type='excitatory')
216+
217+
218+
w1 = proj1.get("weight", "list")
219+
w2 = proj2.get("weight", "list")
220+
221+
assert_equal(w1, w2)
222+
assert_equal(sorted(w1),
223+
sorted([(0.0, 1.0, 0.015), (0.0, 2.0, 0.015), (1.0, 0.0, 0.015),
224+
(1.0, 2.0, 0.015), (2.0, 0.0, 0.015), (2.0, 1.0, 0.015)]))
225+
226+
204227
if __name__ == '__main__':
205228
from pyNN.utility import get_simulator
206229
sim, args = get_simulator()

0 commit comments

Comments
 (0)