Exemplo n.º 1
0
def each_command():
    parser = get_argparser()
    # We're doing some wacky inspection here, let's make sure things are sane
    subparsers, = [
        action for action in parser._actions
        if isinstance(action, argparse._SubParsersAction)
    ]
    choices = tuple(subparsers.choices)
    assert choices
    assert 'local-run' in choices
    return choices
Exemplo n.º 2
0
def each_command():
    parser = get_argparser()
    # We're doing some wacky inspection here, let's make sure things are sane
    subparsers, = [
        action for action in parser._actions
        if isinstance(action, argparse._SubParsersAction)
    ]
    # Remove our dummy help command, paasta help --help is nonsense
    choices = tuple(set(subparsers.choices) - {'help'})
    assert choices
    assert 'local-run' in choices
    return choices
Exemplo n.º 3
0
def each_command():
    parser = get_argparser()
    # We're doing some wacky inspection here, let's make sure things are sane
    subparsers, = [
        action
        for action in parser._actions
        if isinstance(action, argparse._SubParsersAction)
    ]
    choices = tuple(subparsers.choices)
    assert choices
    assert 'local-run' in choices
    return choices
Exemplo n.º 4
0
def each_command():
    parser = get_argparser()
    # We're doing some wacky inspection here, let's make sure things are sane
    subparsers, = [
        action
        for action in parser._actions
        if isinstance(action, argparse._SubParsersAction)
    ]
    # Remove our dummy help command, paasta help --help is nonsense
    choices = tuple(set(subparsers.choices) - {'help'})
    assert choices
    assert 'local-run' in choices
    return choices