Skip to content

Commit 04f61c3

Browse files
authored
Merge pull request #3478 from jessica-mitchell/ticket293
Port regression test 293 to Pytests
2 parents 4a9027b + 356294d commit 04f61c3

File tree

2 files changed

+39
-46
lines changed

2 files changed

+39
-46
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# test_ticket_293.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+
import pytest
24+
25+
26+
@pytest.mark.skipif_missing_threads
27+
def test_ticket_293():
28+
"""
29+
Regression test for Ticket #293.
30+
31+
This test verifies that NEST handles unknown keys in the status dictionary
32+
gracefully when the number of threads is changed. It ensures that an error
33+
is raised for the unknown key, but NEST does not crash.
34+
35+
Author: Hans E Plesser, 2008-10-20
36+
"""
37+
38+
with pytest.raises(Exception):
39+
nest.SetKernelStatus({"local_num_threads": 2, "foo": 5})

testsuite/regressiontests/ticket-293.sli

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)