Skip to content

Commit

Permalink
Merge pull request nest#864 from jakobj/fix/test_disconnect
Browse files Browse the repository at this point in the history
Fix test_disconnect by converting filter object to list for len
  • Loading branch information
heplesser authored Dec 6, 2017
2 parents a77e4a8 + c37b022 commit 3d4d2ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pynest/nest/tests/test_sp/test_disconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ def test_synapse_deletion_one_to_one_no_sp(self):
if mpi_test:
conns = self.comm.allgather(conns)
conns = filter(None, conns)
assert len(conns) == 1
assert len(list(conns)) == 1
nest.DisconnectOneToOne(neurons[0], neurons[2], syn_dict)
conns = nest.GetConnections(
[neurons[0]], [neurons[2]], syn_model)
if mpi_test:
conns = self.comm.allgather(conns)
conns = filter(None, conns)
assert len(conns) == 0
assert len(list(conns)) == 0

# Assert that one can not delete a non existent connection
conns1 = nest.GetConnections(
[neurons[0]], [neurons[1]], syn_model)
if mpi_test:
conns1 = self.comm.allgather(conns1)
conns1 = filter(None, conns1)
assert len(conns1) == 0
assert len(list(conns1)) == 0
try:
nest.DisconnectOneToOne(neurons[0], neurons[1], syn_dict)
assertFail()
Expand Down

0 comments on commit 3d4d2ba

Please sign in to comment.