From 84b27bfa566766c1fd0538bc825a698fcb1ee110 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Fri, 11 Jul 2025 09:58:20 +0200 Subject: [PATCH] convert using cursor --- .../sli2py_regressions/test_ticket_710.py | 36 ++++++++++++++ testsuite/regressiontests/ticket-710.sli | 47 ------------------- 2 files changed, 36 insertions(+), 47 deletions(-) create mode 100644 testsuite/pytests/sli2py_regressions/test_ticket_710.py delete mode 100644 testsuite/regressiontests/ticket-710.sli diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_710.py b/testsuite/pytests/sli2py_regressions/test_ticket_710.py new file mode 100644 index 0000000000..558d3e0068 --- /dev/null +++ b/testsuite/pytests/sli2py_regressions/test_ticket_710.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# +# test_ticket_710.py +# +# This file is part of NEST. +# +# Copyright (C) 2004 The NEST Initiative +# +# NEST is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# NEST is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with NEST. If not, see . + +import nest +import pytest + + +def test_static_synapse_hpc_connects_to_spike_recorder(): + """ + Regression test for Ticket #710. + + Ensure that static_synapse_hpc can be used to connect a neuron to a spike recorder. + """ + nest.ResetKernel() + neuron = nest.Create("iaf_psc_alpha") + sr = nest.Create("spike_recorder") + nest.Connect(neuron, sr, syn_spec={"synapse_model": "static_synapse_hpc"}) + # No assertion needed, test passes if no error is raised. diff --git a/testsuite/regressiontests/ticket-710.sli b/testsuite/regressiontests/ticket-710.sli deleted file mode 100644 index 02132d2fd8..0000000000 --- a/testsuite/regressiontests/ticket-710.sli +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ticket-710.sli - * - * This file is part of NEST. - * - * Copyright (C) 2004 The NEST Initiative - * - * NEST is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * NEST is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NEST. If not, see . - * - */ - -/** @BeginDocumentation - -Name: testsuite::ticket-710 - HPC synapses do not work for spike recorders. - -Synopsis: (ticket-710) run -> NEST exits if test fails - -Description: -Ensure that hpc_synapses work for spike recorders. This test creates 1 neuron and 1 spike recorder and tries to connect them. - -Author: Susanne Kunkel, Maximilian Schmidt, 2012-04-08 - */ - -(unittest) run -/unittest using - -M_ERROR setverbosity - - -/iaf_psc_alpha Create /neuron Set -/spike_recorder Create /sr Set -{ -neuron sr << >> /static_synapse_hpc Connect -} pass_or_die - -endusing