diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index 91e6cc7eb2..d8cfd30883 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -81,12 +81,14 @@ def debug(self): ] sim.setup(1.0) - if (get_config_bool("Machine", "enable_advanced_monitor_support") - and not get_config_bool("Java", "use_java")): + if get_config_bool("Machine", "enable_advanced_monitor_support"): # write_data_speed_up_report - reports.append( - DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) - reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) + if not get_config_bool("Java", "use_java"): + reports.append( + DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) + else: + reports.append( + DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop") pop.record("v") inp = sim.Population(1, sim.SpikeSourceArray( diff --git a/spynnaker_integration_tests/test_debug_mode/check_debug.py b/spynnaker_integration_tests/test_debug_mode/check_debug.py index 6c9ac48798..bbbcac0a7a 100644 --- a/spynnaker_integration_tests/test_debug_mode/check_debug.py +++ b/spynnaker_integration_tests/test_debug_mode/check_debug.py @@ -81,12 +81,14 @@ def debug(self): ] sim.setup(1.0) - if (get_config_bool("Machine", "enable_advanced_monitor_support") - and not get_config_bool("Java", "use_java")): + if get_config_bool("Machine", "enable_advanced_monitor_support"): # write_data_speed_up_report - reports.append( - DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) - reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) + if not get_config_bool("Java", "use_java"): + reports.append( + DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) + else: + reports.append( + DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop") pop.record("v") inp = sim.Population(1, sim.SpikeSourceArray( diff --git a/unittests/model_tests/neuron/test_synaptic_manager.py b/unittests/model_tests/neuron/test_synaptic_manager.py index 7206979488..e74a0e9f73 100644 --- a/unittests/model_tests/neuron/test_synaptic_manager.py +++ b/unittests/model_tests/neuron/test_synaptic_manager.py @@ -24,6 +24,9 @@ from spinn_machine.version.version_strings import VersionStrings from spinnman.transceiver.mockable_transceiver import MockableTransceiver from spinnman.transceiver import Transceiver +from spinnman.processes import MostDirectConnectionSelector +from spinnman.connections.udp_packet_connections import SCAMPConnection +from spinnman.exceptions import SpinnmanTimeoutException from pacman.model.placements import Placement from pacman.operations.routing_info_allocator_algorithms import ( ZonedRoutingInfoAllocator) @@ -61,6 +64,14 @@ import pyNN.spiNNaker as p +class _MockConnection(SCAMPConnection): + def send(self, data): + pass + + def receive_scp_response(self, timeout=1.0): + raise SpinnmanTimeoutException("Test", timeout) + + class _MockTransceiverinOut(MockableTransceiver): @overrides(MockableTransceiver.malloc_sdram) @@ -99,6 +110,10 @@ def read_word( datum, = struct.unpack(" MostDirectConnectionSelector: + return MostDirectConnectionSelector([_MockConnection(0, 0)]) + def say_false(self, *args, **kwargs): return False