def count_alive_neighbours_three_test(self): self.current_cell = [2,1] self.alive_neighbours = count_alive_neighbours(self.universe, self.current_cell) self.assertEqual(self.alive_neighbours, 3)
def no_wrap_around_test_not_expected(self): self.current_cell = [0,3] alive_neightbour_count = count_alive_neighbours(self.wrap_test_universe, self.current_cell) # 3 alive neghbours will be present if top wraps to bottom self.assertNotEqual(alive_neightbour_count, 3)
def count_alive_neighbours_one_test(self): self.current_cell = [3,2] self.alive_neighbours = count_alive_neighbours(self.universe, self.current_cell) self.assertEqual(self.alive_neighbours, 1)
def no_wrap_around_test_expected(self): self.current_cell = [0,3] alive_neightbour_count = count_alive_neighbours(self.wrap_test_universe, self.current_cell) self.assertEqual(alive_neightbour_count, 0)