Beispiel #1
0
def test__parse_help():
    cmd, options, cmdoptions, args = dispatch._parse(['help'])
    assert cmd == 'help'

    cmd, options, cmdoptions, args = dispatch._parse([])
    assert cmd == 'help'

    cmd, options, cmdoptions, args = dispatch._parse(['-h'])
    assert cmd == 'help'
    assert options['help'] == True
Beispiel #2
0
def test__parse_help():
    cmd, options, cmdoptions, args = dispatch._parse(['help'])
    assert cmd == 'help'

    cmd, options, cmdoptions, args = dispatch._parse([])
    assert cmd == 'help'

    cmd, options, cmdoptions, args = dispatch._parse(['-h'])
    assert cmd == 'help'
    assert options['help'] == True
Beispiel #3
0
def test__parse_subcmd_options():
    cmd, options, cmdoptions, args = dispatch._parse(['push', '-b', 'http://localhost'])
    assert cmd == 'push'
    assert cmdoptions['browse'] == True
Beispiel #4
0
 def long():
     dispatch._parse(['--unkown'])
Beispiel #5
0
 def app_arg():
     dispatch._parse(['init', '-X'])
Beispiel #6
0
 def short():
     dispatch._parse(['-X'])
Beispiel #7
0
def test__parse_subcmd_options():
    cmd, options, cmdoptions, args = dispatch._parse(
        ['push', '-b', 'http://localhost'])
    assert cmd == 'push'
    assert cmdoptions['browse'] == True
Beispiel #8
0
 def long():
     dispatch._parse(['--unkown'])
Beispiel #9
0
 def app_arg():
     dispatch._parse(['init', '-X'])
Beispiel #10
0
 def short():
     dispatch._parse(['-X'])