def METHOD_NAME():
    from unittest_ex import ColorResult, BetterRunner, TestCaseEx
    from pavilion.unittest import PavTestCase
    from pavilion import log_setup
    config = PavTestCase.TEST_DATA_ROOT/'pav_config_dir'/'pavilion.yaml'
    if not config.exists():
        msg("\nERROR")
        msg("Could not find a config file at '{}'".format(config))
        msg("To run tests, this file must be created.")
        msg("It may be blank, or may contain proxy info.")
        sys.exit(1)
    parser = argparse.ArgumentParser(
        usage="This runs all the tests in the tests/ directory. For a python " 
              "file to be recognized as a test suite, it must end in "
              "'_tests.py'. All other files are ignored")
    parser.add_argument('-l', '--list', action='store_true',
                        help="List the tests, but don't run them.")
    parser.add_argument('-s', '--skip', action='append', default=[],
                        help="Skip tests matching the given glob pattern. The "
                             "'test_' prefix is removed from the name for this "
                             "check.")
    parser.add_argument('-o', '--only', action='append', default=[],
                        help="Only run tests matching the given glob pattern. "
                             "The 'test_' prefix is removed from the name "
                             "for this check.")
    parser.add_argument('--re-run', action='store_true', default=False,
                        help="Only run tests that failed last time.")
    parser.add_argument('-v', '--verbose', action='store_true', default=False,
                        help="Print all log output to stderr.")
    parser.add_argument('-q', '--quiet', action='store_true', default=False,
                        help="Silence.")
    parser.add_argument('-C', '--no-clear', action='store_true', default=False,
                        help="Don't clear the working directory before "
                             "running.")
    args = parser.parse_args(sys.argv[1:])
    if args.skip:
        TestCaseEx.set_skip(args.skip)
    only = args.only
    if args.re_run:
        only += load_failures()
        if not only:
            msg("Selected re-run-failures, but there were no previous failures to re-run.")
            return 0
    if only:
        TestCaseEx.set_only(only)
    working_dir = this_file.parent/'working_dir'
    if not args.list and not args.no_clear and working_dir.exists():
        msg("Clearing out the working directory from prior unit test runs.")
        shutil.rmtree(working_dir.as_posix(), ignore_errors=False)
    log_out = log_setup.setup_loggers(PavTestCase().pav_cfg)
    verbosity = 0 if args.quiet else 2
    loader = unittest.TestLoader()
    msg("Finding all tests.")
    test_pattern = '*_tests.py'
    suite = loader.discover(tests_dir.as_posix(), pattern=test_pattern)
    if args.list:
        list_tests(suite)
        return 0
    else:
        msg("Starting test runs.")
        runner = BetterRunner(resultclass=ColorResult, verbosity=verbosity)
        result = runner.run(suite)
        if args.verbose:
            msg("Log Output")
            msg("--------------------")
            msg(log_out.getvalue())
        save_failures(result.errors + result.failures)
        return len(result.errors) + len(result.failures)