def main(): _import_testfiles() config = Configurator().config testcases = get_testcases() if config.group: # filter selected groups testcases = [ t for t in testcases if path.basename(t.__module__) in config.group ] runner = TestRunner(config, testcases) sys.exit(runner.run_tests())
def _run_tests(config): """Run tests imported from repository tree from selected groups""" testcases = get_testcases() if config.group: # filter selected groups testcases = [t for t in testcases if path.basename(t.__module__) in config.group] if not testcases: sys.exit('No testcases found for selected groups. ' 'Provided group name may be invalid.') return helpers.run_tests_common(testcases, config)