def test_connect_with_index_based_delays(self): syn = sim.StaticSynapse(weight=1.0, delay=self.IndexBasedDelays()) C = connectors.IndexBasedProbabilityConnector( self.IndexBasedProbability()) prj = sim.Projection(self.p1, self.p2, C, syn) self.assertEqual( prj.get(["weight", "delay"], format='list', gather=False ), # use gather False because we are faking the MPI [(0, 0, 1, 1), (3, 0, 1, 4), (1, 2, 1, 4), (4, 2, 1, 7), (2, 4, 1, 7)])
def test_connect_with_index_based_delays(self, sim=sim): syn = sim.StaticSynapse(weight=1.0, delay=self.IndexBasedDelays()) C = connectors.IndexBasedProbabilityConnector(self.IndexBasedProbability()) prj = sim.Projection(self.p1, self.p2, C, syn) self.assertEqual(prj.get(["weight", "delay"], format='list'), [(0, 0, 1., 1), (3, 0, 1., 4), (2, 1, 1., 4), (1, 2, 1., 4), (4, 2, 1., 7), (0, 3, 1., 4), (3, 3, 1., 7), (2, 4, 1., 7)])