예제 #1
0
파일: main.py 프로젝트: sheiiva/304pacman
def main():

    argsManager = ArgumentManager()

    if argsManager.needHelp(argv):
        Usage()
    elif argsManager.checkArgs(argv) == 84:
        print()
        Usage()
        exit(84)
    else:
        Mazer(int(argv[1]), int(argv[2])).run()
예제 #2
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()

    assert redir.out == HELP_MESSAGE
예제 #3
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()

    assert redir.out == "{}\n".format(HELP_MESSAGE)
예제 #4
0
def main():

    argsManager = ArgumentManager()

    if argsManager.needHelp(argv):
        Usage()
    elif argsManager.checkArgs(argv) == 84:
        exit(84)
    else:
        Pollution().run(argv)
예제 #5
0
def main():

    argsManager = ArgumentManager()

    if argsManager.needHelp(argv):
        Usage()
    elif argsManager.checkArgs(argv) == 84:
        exit(84)
    else:
        Pacman(argv[2], argv[3]).run(argv[1])
예제 #6
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()
    expected = "\
USAGE\n\
\t./301dannon file\n\
DESCRIPTION\n\
\tfile\tfile that contains the numbers to be sorted, separated by spaces.\n"

    assert redir.out == expected
예제 #7
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()
    expected = "\
USAGE\n\
\t./302separation file [n | p1 p2]\n\
DESCRIPTION\n\
\tfile\tfile that contains the list of Facebook connections\n\
\tn\tmaximum length of the paths\n\
\tpi\tname of someone in the file\n"

    assert redir.out == expected