def test_initial_setup(self): import spynnaker.pyNN as pynn self.assertEqual(pynn.setup(timestep=1, min_delay=1, max_delay=15.0), None) self.assertEqual(conf.config.getint("Machine", "machineTimeStep"), 1 * 1000) self.assertEqual(pynn.get_min_delay(), 1) self.assertEqual(pynn.get_max_delay(), 15.0)
def test_get_min_delay_0_1_milisecond_timestep(self): """ tests if with no user min, the min is set to 1 timestep in millisencsd :return: """ p.setup(0.1) min_delay = p.get_min_delay() self.assertEqual(min_delay, 0.1)
def test_initial_setup(self): import spynnaker.pyNN as pynn self.assertEqual(pynn.setup(timestep=1, min_delay=1, max_delay=15.0), 0) self.assertEqual(conf.config.getint("Machine", "machineTimeStep"), 1 * 1000) self.assertEqual(pynn.get_min_delay(), 1) self.assertEqual(pynn.get_max_delay(), 15.0)
def test_valid_min_delay_0_1_millisecond_timestep_take_2(self): """ tests if with valid user min, the min is set correctly :return: """ p.setup(0.1, min_delay=0.4) min_delay = p.get_min_delay() self.assertEqual(min_delay, 0.4)