Skip to content

Commit

Permalink
test too few cores
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Oct 18, 2023
1 parent f8541a9 commit 1100512
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions unittests/test_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,13 @@ def test_concentric_xys(self):
(2, 4), (1, 3), (0, 2), (0, 1), (0, 0), (1, 0)]
self.assertListEqual(expected, found)

def test_too_few_cores(self):
machine = virtual_machine(8, 8)
# Hack to get n_processors return a low number
machine.get_chip_at(0, 1)._p = [1, 2, 3]
with self.assertRaises(SpinnMachineException):
machine.validate()


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

0 comments on commit 1100512

Please sign in to comment.