def run_launcher(*args):
    """Run launcher.py."""
    string_io = StringIO.StringIO()

    with mock.patch('sys.stdout', string_io):
        launcher.main(['launcher.py'] + list(args))

    return string_io.getvalue()
Пример #2
0
def run_launcher(*args):
    """Run launcher.py."""
    mock_stdout = test_utils.MockStdout()

    with mock.patch('sys.stdout', mock_stdout):
        launcher.main(['launcher.py'] + list(args))

    return mock_stdout.getvalue()
Пример #3
0
def run_launcher(*args):
    """Run launcher.py."""
    mock_stdout = test_utils.MockStdout()

    os.environ['FUZZ_TARGET'] = args[1]
    with mock.patch('sys.stdout', mock_stdout):
        launcher.main(['launcher.py'] + list(args))

    return mock_stdout.getvalue()