Skip to content

Commit

Permalink
removed unnecessary variables gid_source and gid_parrot;
Browse files Browse the repository at this point in the history
  • Loading branch information
flinz committed Nov 3, 2015
1 parent 3d8da20 commit 9c4c2f3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pynest/nest/tests/test_parrot_neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ def setUp(self):
nest.Connect(self.source, self.spikes)
nest.Connect(self.parrot, self.spikes)

self.gid_source = self.source[0]
self.gid_parrot = self.parrot[0]

def test_ParrotNeuronRepeatSpike(self):
"""Check parrot_neuron repeats spikes on port 0"""

Expand All @@ -56,7 +53,7 @@ def test_ParrotNeuronRepeatSpike(self):

# get spike from parrot neuron
events = nest.GetStatus(self.spikes)[0]["events"]
post_time = events['times'][events['senders'] == self.gid_parrot]
post_time = events['times'][events['senders'] == self.parrot[0]]

# assert spike was repeated at correct time
assert post_time, "Parrot neuron failed to repeat spike."
Expand All @@ -71,7 +68,7 @@ def test_ParrotNeuronIgnoreSpike(self):

# get spike from parrot neuron, assert it was ignored
events = nest.GetStatus(self.spikes)[0]["events"]
post_time = events['times'][events['senders'] == self.gid_parrot]
post_time = events['times'][events['senders'] == self.parrot[0]]
assert len(post_time) == 0, "Parrot neuron failed to ignore spike arriving on port 1"


Expand Down

0 comments on commit 9c4c2f3

Please sign in to comment.