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