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