From 1100512b9797015351a2379d1901387a870816d4 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 18 Oct 2023 11:48:16 +0100 Subject: [PATCH] test too few cores --- unittests/test_machine.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unittests/test_machine.py b/unittests/test_machine.py index 864d0a46..b417a22b 100644 --- a/unittests/test_machine.py +++ b/unittests/test_machine.py @@ -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()