

def test_get_initial_positions(self):
    test_layout = ' #######\n                #0    #\n                #  1  #\n                #    2#\n                ####### '
    number_bots = 3
    layout = Layout(test_layout, layout_chars, number_bots)
    mesh = layout.as_mesh()
    initial_pos = extract_initial_positions(mesh, number_bots)
    target = [(1, 1), (3, 2), (5, 3)]
    self.assertEqual(target, initial_pos)
    target = Mesh(7, 5, data=list('########     ##     ##     ########'))
    self.assertEqual(target, mesh)
    test_layout2 = ' ##################\n                #0#      #       #\n                #1#####    #####2#\n                #       #      #3#\n                ################## '
    number_bots = 4
    layout = Layout(test_layout2, layout_chars, number_bots)
    mesh = layout.as_mesh()
    initial_pos = extract_initial_positions(mesh, number_bots)
    target = [(1, 1), (1, 2), (16, 2), (16, 3)]
    self.assertEqual(target, initial_pos)
    target = Mesh(18, 5, data=list(('################### #      #       #' + '# #####    ##### ##       #      # ###################')))
    self.assertEqual(target, mesh)

dataset/ETHPy150Open ASPP/pelita/test/test_datamodel.py TestStaticmethods.test_get_initial_positions/original