コード例 #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
コード例 #2
0
ファイル: test_dispatch.py プロジェクト: couchapp/couchapp
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
コード例 #3
0
ファイル: test_dispatch.py プロジェクト: couchapp/couchapp
def test__parse_subcmd_options():
    cmd, options, cmdoptions, args = dispatch._parse(['push', '-b', 'http://localhost'])
    assert cmd == 'push'
    assert cmdoptions['browse'] == True
コード例 #4
0
ファイル: test_dispatch.py プロジェクト: couchapp/couchapp
 def long():
     dispatch._parse(['--unkown'])
コード例 #5
0
ファイル: test_dispatch.py プロジェクト: couchapp/couchapp
 def app_arg():
     dispatch._parse(['init', '-X'])
コード例 #6
0
ファイル: test_dispatch.py プロジェクト: couchapp/couchapp
 def short():
     dispatch._parse(['-X'])
コード例 #7
0
def test__parse_subcmd_options():
    cmd, options, cmdoptions, args = dispatch._parse(
        ['push', '-b', 'http://localhost'])
    assert cmd == 'push'
    assert cmdoptions['browse'] == True
コード例 #8
0
 def long():
     dispatch._parse(['--unkown'])
コード例 #9
0
 def app_arg():
     dispatch._parse(['init', '-X'])
コード例 #10
0
 def short():
     dispatch._parse(['-X'])