Example #1
0
 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)
Example #2
0
 def test_max_delay_no_user_input_1_millisecond_timestep(self):
     """
     Tests that with no user input, the max delay is correct
     :return:
     """
     p.setup(1)
     max_delay = p.get_max_delay()
     self.assertEqual(max_delay, 144)
Example #3
0
 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)
Example #4
0
 def test_valid_max_delay_0_1_millisecond_timestep(self):
     """
     tests if with valid user min, the min is set correctly
     :return:
     """
     p.setup(0.1, max_delay=0.4)
     max_delay = p.get_max_delay()
     self.assertEqual(max_delay, 0.4)