Skip to content

Commit

Permalink
Merge pull request #2804 from nicolossus/port_issue_1242
Browse files Browse the repository at this point in the history
Port `issue-1242.sli` to Pytest
  • Loading branch information
heplesser authored Aug 7, 2023
2 parents 8e1489b + dd08ef3 commit 1b69469
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 53 deletions.
44 changes: 44 additions & 0 deletions testsuite/pytests/sli2py_regressions/test_issue_1242.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
#
# test_issue_1242.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 <http://www.gnu.org/licenses/>.

"""
Regression test for Issue #1242 (GitHub).
"""

import pytest

import nest


def test_volume_transmitter_illegal_connection():
"""
Test that volume transmitter throws an error for illegal connection.
The test ensures that a connection from a node without proxies to
a node without proxies that has global targets throws an error
(instead of failing silently or resulting in inconsistent results).
"""

sg = nest.Create("spike_generator")
vt = nest.Create("volume_transmitter")

with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
nest.Connect(sg, vt)
53 changes: 0 additions & 53 deletions testsuite/regressiontests/issue-1242.sli

This file was deleted.

0 comments on commit 1b69469

Please sign in to comment.