From 037936957a43c6f16ca117a90073dbf6f479466b Mon Sep 17 00:00:00 2001 From: Donal Fellows Date: Fri, 4 Oct 2019 09:19:16 +0100 Subject: [PATCH] A few more lint fixes for the fixed route router --- pacman/operations/algorithms_metadata.xml | 5 ----- .../fixed_route_router/fixed_route_router.py | 3 +-- unittests/test_fixed_route_router.py | 21 +++++++------------ 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/pacman/operations/algorithms_metadata.xml b/pacman/operations/algorithms_metadata.xml index 71b807bfd..4f8106a66 100644 --- a/pacman/operations/algorithms_metadata.xml +++ b/pacman/operations/algorithms_metadata.xml @@ -34,15 +34,10 @@ destination_class FixedRouteDestinationClass - - board_version - BoardVersion - placements machine - board_version destination_class diff --git a/pacman/operations/fixed_route_router/fixed_route_router.py b/pacman/operations/fixed_route_router/fixed_route_router.py index 1848778be..940062d48 100644 --- a/pacman/operations/fixed_route_router/fixed_route_router.py +++ b/pacman/operations/fixed_route_router/fixed_route_router.py @@ -25,12 +25,11 @@ class FixedRouteRouter(object): "_destination_class", "_fixed_route_tables", "_machine", "_placements"] - def __call__(self, machine, placements, board_version, destination_class): + def __call__(self, machine, placements, destination_class): """ Runs the fixed route generator for all boards on machine :param machine: SpiNNMachine object :param placements: placements object - :param board_version: to be nuked :param destination_class: the destination class to route packets to :return: router tables for fixed route paths """ diff --git a/unittests/test_fixed_route_router.py b/unittests/test_fixed_route_router.py index fac896a4d..4e93b82ed 100644 --- a/unittests/test_fixed_route_router.py +++ b/unittests/test_fixed_route_router.py @@ -54,8 +54,7 @@ def _check_setup(width, height, down_chips, down_links): Placement(DestinationVertex(), ethernet_chip.x, ethernet_chip.y, 1) for ethernet_chip in ethernet_chips) - fixed_route_tables = router( - machine, placements, "bacon", DestinationVertex) + fixed_route_tables = router(machine, placements, DestinationVertex) for x, y in machine.chip_coordinates: assert (x, y) in fixed_route_tables @@ -80,9 +79,7 @@ def _check_setup(width, height, down_chips, down_links): (False, True), (True, True)]) def test_all_working(width, height, with_down_links, with_down_chips): - - temp_machine = virtual_machine( - width=width, height=height) + temp_machine = virtual_machine(width=width, height=height) down_links = None if with_down_links: down_links = set() @@ -106,15 +103,11 @@ def test_unreachable(): if __name__ == '__main__': - iterations = [ + _iterations = [ (False, False), (True, False), (False, True)] - for (_x, _y) in iterations: - test_all_working(2, 2, None, 3, _x, _y) - test_all_working(2, 2, None, 3, _x, _y) - test_all_working(None, None, 3, 3, _x, _y) - test_all_working(8, 8, None, 5, _x, _y) - test_all_working(None, None, 5, 5, _x, _y) - test_all_working(12, 12, None, 5, _x, _y) - test_all_working(16, 16, None, 5, _x, _y) + _sizes = [2, 8, 12, 16] + for (_down_links, _down_chips) in _iterations: + for _size in _sizes: + test_all_working(_size, _size, _down_links, _down_chips)