Skip to content

Commit

Permalink
fix pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
janeirik committed Apr 25, 2023
1 parent deadac5 commit de1cc76
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions testsuite/pytests/test_connect_after_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
import nest
import pytest


@pytest.fixture(autouse=True)
def reset_kernel():
nest.ResetKernel()


@pytest.mark.parametrize("sort_connections", [True, False])
def test_connections_before_after_simulate(sort_connections):
"""Pre-condition:
Expand All @@ -46,7 +48,9 @@ def test_connections_before_after_simulate(sort_connections):
})

neurons = nest.Create("iaf_psc_alpha", 10)
nest.Connect(neurons, neurons, conn_spec={"rule": "fixed_indegree", "indegree": 2})
nest.Connect(neurons, neurons,
conn_spec={"rule": "fixed_indegree", "indegree": 2}
)

connections_before = nest.GetConnections()

Expand All @@ -56,6 +60,7 @@ def test_connections_before_after_simulate(sort_connections):

assert connections_before == connections_after


@pytest.mark.parametrize("sort_connections", [True, False])
def test_connect_after_simulate(sort_connections):
"""
Expand Down Expand Up @@ -105,7 +110,6 @@ def test_connect_after_simulate(sort_connections):
nest.GetConnections(target=parrot)[0].get("port") == 1
else:
nest.GetConnections(target=parrot)[0].get("port") == 101
# One spike from before, additionally 1 more spike,
# One spike from before, additionally 1 more spike,
# now 2 connections to parrot -> 3 events in total
assert nest.GetStatus(recorder)[0]["n_events"] == 3

0 comments on commit de1cc76

Please sign in to comment.