Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Oct 14, 2024
1 parent 151820f commit d585f9a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def send_spike(self, label, conn):
def do_run(self):
conn = sim.external_devices.SpynnakerLiveSpikesConnection(
send_labels=["Inject"], local_port=None)
conn.add_start_callback("Inject", self.send_spike)
conn.add_start_resume_callback("Inject", self.send_spike)

sim.setup(1.0)
source_1 = sim.Population(1, sim.SpikeSourceArray(spike_times=[0]))
Expand Down Expand Up @@ -67,13 +67,13 @@ def do_run(self):
print(weights_3)

# There should be a spike to each neuron
assert len(spikes[0]) == 1
assert len(spikes[1]) == 1
assert len(spikes[2]) == 1
self.assertEqual(len(spikes[0]), 1)
self.assertEqual(len(spikes[1]), 1)
self.assertEqual(len(spikes[2]), 1)

assert numpy.array_equal(weights_1, ([0, 0, 5.0], ))
assert numpy.array_equal(weights_2, ([0, 1, 5.0], ))
assert numpy.array_equal(weights_3, ([0, 2, 5.0], ))
self.assertListEqual(list(weights_1), [[0, 0, 5.0]])
self.assertListEqual(list(weights_2), [[0, 1, 5.0]])
self.assertListEqual(list(weights_3), [[0, 2, 5.0]])

def test_run(self):
self.runsafe(self.do_run)

0 comments on commit d585f9a

Please sign in to comment.