def run_script_usage_tests(test_data_dir, scripts_dir, working_dir, verbose=False, tests=None, force_overwrite=False, timeout=60):
 working_dir = join(working_dir, 'script_usage_tests')
 logger = None
 if verbose:
  logger = sys.stdout
 script_tester = ScriptTester(logger=logger)
 script_tester(scripts_dir, test_data_dir, working_dir, scripts=tests, timeout=timeout, force_overwrite=force_overwrite)
 result_summary = script_tester.result_summary()
 has_failures_or_errors = script_tester.has_failures_or_errors()
 if exists(working_dir):
  rmtree(working_dir)
 return (result_summary, has_failures_or_errors)

def run_script_usage_tests ( test_data_dir , scripts_dir , working_dir , verbose = False , tests = None , force_overwrite = False , timeout = 60 ) : working_dir = join ( working_dir , 'script_usage_tests' ) logger = None if verbose : logger = sys . stdout script_tester = ScriptTester ( logger = logger ) script_tester ( scripts_dir , test_data_dir , working_dir , scripts = tests , timeout = timeout , force_overwrite = force_overwrite ) result_summary = script_tester . result_summary ( ) has_failures_or_errors = script_tester . has_failures_or_errors ( ) if exists ( working_dir ) : rmtree ( working_dir ) return ( result_summary , has_failures_or_errors )
test script_usage examples when test data is present in test_data_dir returns a result summary string and a boolean indicating whether there were any errors or failures while running the commands .