|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# test_ticket_689.py |
| 4 | +# |
| 5 | +# This file is part of NEST. |
| 6 | +# |
| 7 | +# Copyright (C) 2004 The NEST Initiative |
| 8 | +# |
| 9 | +# NEST is free software: you can redistribute it and/or modify |
| 10 | +# it under the terms of the GNU General Public License as published by |
| 11 | +# the Free Software Foundation, either version 2 of the License, or |
| 12 | +# (at your option) any later version. |
| 13 | +# |
| 14 | +# NEST is distributed in the hope that it will be useful, |
| 15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | +# GNU General Public License for more details. |
| 18 | +# |
| 19 | +# You should have received a copy of the GNU General Public License |
| 20 | +# along with NEST. If not, see <http://www.gnu.org/licenses/>. |
| 21 | + |
| 22 | +import nest |
| 23 | + |
| 24 | +""" |
| 25 | +Regression test for Ticket #689. |
| 26 | +
|
| 27 | +Test ported from SLI regression test. |
| 28 | +Ensure GetConnections works correctly with hpc synapses. |
| 29 | +
|
| 30 | +Authors: Susanne Kunkel and Maximilian Schmidt, 2012-02-19 |
| 31 | +""" |
| 32 | + |
| 33 | + |
| 34 | +def test_ticket_689_getconnections_with_hpc_synapse(): |
| 35 | + """ |
| 36 | + Ensure retrieving connections with stdp_pl_synapse_hom_hpc succeeds. |
| 37 | + """ |
| 38 | + |
| 39 | + nest.ResetKernel() |
| 40 | + nest.total_num_virtual_procs = 1 |
| 41 | + |
| 42 | + n1 = nest.Create("iaf_psc_alpha") |
| 43 | + n2 = nest.Create("iaf_psc_alpha") |
| 44 | + |
| 45 | + nest.Connect(n1, n2, conn_spec={"rule": "all_to_all"}, syn_spec="stdp_pl_synapse_hom_hpc") |
| 46 | + |
| 47 | + connections = nest.GetConnections(target=n2) |
| 48 | + |
| 49 | + assert len(connections) == 1 |
0 commit comments