def METHOD_NAME(self):
    log_cmd = commands.get_command('log')
    parser = argparse.ArgumentParser()
    log_cmd._setup_arguments(parser)
    # run a simple test
    test = self._quick_test(finalize=False)
    raw = schedulers.get_plugin('raw')
    raw.schedule_tests(self.pav_cfg, [test])
    end = time.time() + 5
    while not test.complete and time.time() < end:
        time.sleep(.1)
    out = io.StringIO()
    err = io.StringIO()
    log_cmd.outfile = out
    log_cmd.errfile = err
    # test `pav log run test`
    args = parser.parse_args(['run', test.full_id])
    result = log_cmd.run(self.pav_cfg, args)
    err.seek(0)
    out.seek(0)
    self.assertEqual(err.read(), '')
    self.assertEqual(out.read(), 'Hello World.\n')
    self.assertEqual(result, 0)
    # test `pav log build test`
    # note: echo-ing hello world should not require anything to be built
    out.truncate(0)
    err.truncate(0)
    args = parser.parse_args(['build', test.full_id])
    log_cmd.run(self.pav_cfg, args)
    out.seek(0)
    err.seek(0)
    self.assertEqual(out.read(), '')
    # test `pav log kickoff test`
    # note: in general, kickoff.log should be an empty file
    out.truncate(0)
    err.truncate(0)
    args = parser.parse_args(['kickoff', test.full_id])
    result = log_cmd.run(self.pav_cfg, args)
    out.seek(0)
    err.seek(0)
    self.assertEqual(out.getvalue(), '')
    self.assertEqual(err.getvalue(), '')
    self.assertEqual(result, 0)
    # test 'pav log global'
    out.truncate(0)
    err.truncate(0)
    args = parser.parse_args((['global']))
    result = log_cmd.run(self.pav_cfg, args)
    out.seek(0)
    err.seek(0)
    self.assertEqual(result, 0)
    self.assertEqual(err.getvalue(), '')
    # test 'pav log all_results'
    out.truncate(0)
    err.truncate(0)
    args = parser.parse_args(['all_results'])
    result = log_cmd.run(self.pav_cfg, args)
    out.seek(0)
    err.seek(0)
    self.assertEqual(result, 0)
    self.assertEqual(err.getvalue(), '')