Exemplo n.º 1
0
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()
Exemplo n.º 2
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()

    assert redir.out == HELP_MESSAGE
Exemplo n.º 3
0
def test_show(capsys):

    Usage()

    redir = capsys.readouterr()

    assert redir.out == "{}\n".format(HELP_MESSAGE)
Exemplo n.º 4
0
def main():

    argsManager = ArgumentManager()

    if argsManager.needHelp(argv):
        Usage()
    elif argsManager.checkArgs(argv) == 84:
        exit(84)
    else:
        Pollution().run(argv)
Exemplo n.º 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])
Exemplo n.º 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
Exemplo n.º 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