예제 #1
0
def test_show_version(stdout):
    args = ['acmd', '--version']
    try:
        tool_repo.reset()
        main(args, rcfile="tests/test_data/test_acmd.rc")
    except SystemExit:
        pass

    eq_(__version__ + '\n', stdout.getvalue())
예제 #2
0
def test_show_version(stdout):
    args = ['acmd', '--version']

    try:
        main(args)
    except SystemExit as e:
        pass

    eq_(__version__ + '\n', stdout.getvalue())
예제 #3
0
def test_show_version(stdout):
    args = ['acmd', '--version']

    try:
        main(args)
    except SystemExit as e:
        pass

    eq_(__version__ + '\n', stdout.getvalue())
예제 #4
0
def test_run_tool(_, load_proj):
    _tool = tool_repo.get_tool('mock_tool')
    eq_(False, _tool.did_run)

    args = ['acmd', 'mock_tool']
    try:
        exit_code = 0
        main(args)
    except SystemExit as e:
        exit_code = e.code
    eq_(1147, exit_code)

    eq_(True, load_proj.called)
    
    _tool = tool_repo.get_tool('mock_tool')
    eq_(True, _tool.did_run)
예제 #5
0
def test_run_tool(deploy_bash, load_proj):
    _tool = get_tool('mock_tool')
    eq_(False, _tool.did_run)

    args = ['acmd', 'mock_tool']
    try:
        exit_code = 0
        main(args)
    except SystemExit as e:
        exit_code = e.code
    eq_(1147, exit_code)

    eq_(True, load_proj.called)
    
    _tool = get_tool('mock_tool')
    eq_(True, _tool.did_run)