Beispiel #1
0
def test_expected(n, expected):
    wh = Warehouse()
    # removes unneccessary \n
    wh.from_lines(n.split(sep='\n'))
    answer = solve_sokoban_macro(wh)
    if answer == expected:
        print('Test Passed')
    else:
        print("Test Failed")
def test_taboo(test, expected):
    wh = Warehouse()
    print(test)
    # removes unneccessary \n
    wh.from_lines(test.split(sep='\n'))
    answer = taboo_cells(wh)
    print(answer)
    if same_multi_line_strings(answer, expected):
        print('Test Passed')
    else:
        print("Test Failed")
Beispiel #3
0
def test_can_go_there(test, dst, expected):
    wh = Warehouse()
    print(test)
    # removes unneccessary \n
    wh.from_lines(test.split(sep='\n'))
    answer = can_go_there(wh, dst)
    print(wh.worker, '->', dst, '=', answer)
    if answer is expected:
        print("Test Passed")
    else:
        print("Test Failed")