Did I find the right examples for you? yes no

All Samples(32)  |  Call(32)  |  Derive(0)  |  Import(0)
Wrapper for :func:`add_commands`.

src/a/r/argh-0.24.1/test/test_integration.py   argh(Download)
 
    p = DebugArghParser('PROG')
    p.add_commands([old, old_marked, new])
 
    assert R('ok 1\n', '') == run(p, 'old ok')
 
    p = DebugArghParser()
    p.add_commands([echo])
 
    _argv = sys.argv
 
    p = DebugArghParser()
    p.add_commands([cmd])
 
    if sys.version_info < (3,3):
 
    p = DebugArghParser()
    p.add_commands([cmd])
 
    assert run(p, 'bar', exit=True).startswith('invalid choice')
 
    p = DebugArghParser()
    p.add_commands([cmd], namespace='nest')
 
    assert run(p, 'nest bar', exit=True).startswith('invalid choice')

src/a/r/argh-HEAD/test/test_integration.py   argh(Download)
 
    p = DebugArghParser('PROG')
    p.add_commands([old, old_marked, new])
 
    assert R('ok 1\n', '') == run(p, 'old ok')
 
    p = DebugArghParser()
    p.add_commands([echo])
 
    _argv = sys.argv
 
    p = DebugArghParser()
    p.add_commands([cmd])
 
    if sys.version_info < (3,3):
 
    p = DebugArghParser()
    p.add_commands([cmd])
 
    assert run(p, 'bar', exit=True).startswith('invalid choice')
 
    p = DebugArghParser()
    p.add_commands([cmd], namespace='nest')
 
    assert run(p, 'nest bar', exit=True).startswith('invalid choice')

src/a/r/argh-0.24.1/test/test_regressions.py   argh(Download)
 
    p = DebugArghParser()
    p.add_commands([parrot, grenade])
 
    # default → type (int)
        def __init__(self):
            self.p = DebugArghParser()
            self.p.add_commands([self.test_command])
 
        @argh.alias("test")

src/a/r/argh-HEAD/test/test_regressions.py   argh(Download)
 
    p = DebugArghParser()
    p.add_commands([parrot, grenade])
 
    # default → type (int)
        def __init__(self):
            self.p = DebugArghParser()
            self.p.add_commands([self.test_command])
 
        @argh.alias("test")