Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Apr 8, 2024
1 parent c420276 commit 39d3ac2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spinn_machine/version/abstract_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,4 @@ def size_from_n_boards(self, n_boards: int) -> Tuple[int, int]:
if n_boards == 1:
return self.board_shape
raise SpinnMachineException(
f"Version {self} does not support multiple boards")
f"Version {self} does not support multiple boards")
6 changes: 6 additions & 0 deletions unittests/test_virtual_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,14 @@ def test_2_2_by_cores(self):

def test_2_2_by_cores_too_many(self):
set_config("Machine", "version", 2)
version = MachineDataView.get_machine_version()
n_cores = sum(version.chip_core_map.values())
n_cores -= version.n_chips_per_board
with self.assertRaises(SpinnMachineException):
machine = virtual_machine(n_cores=100)
self.assertEqual(2, machine.width)
self.assertEqual(2, machine.height)
self.assertEqual(n_cores, machine.total_available_user_cores)

def test_8_8_by_cores_1_board(self):
set_config("Machine", "version", 5)
Expand Down
3 changes: 1 addition & 2 deletions unittests/version/test_version5.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_processor_info(self):

def test_size_from_n_cores(self):
version = Version5()
#self.assertEqual((8, 8), version.size_from_n_cores(10))
self.assertEqual((8, 8), version.size_from_n_cores(10))
# standard for there to be 8 17 core Chips and each has 1 scamp core
n_cores = 17 * 48 - 8
self.assertEqual((8, 8), version.size_from_n_cores(n_cores))
Expand All @@ -167,6 +167,5 @@ def test_size_from_n_cores(self):
self.assertEqual((40, 40), version.size_from_n_cores(n_cores * 18 + 1))



if __name__ == '__main__':
unittest.main()

0 comments on commit 39d3ac2

Please sign in to comment.