def setUp(self): """Test case setup""" conf_path = os.path.join(self.test_path, os.pardir, os.pardir, os.pardir, 'etc/conf') dt_cfg.load_config_files(conf_path) logging.disable(logging.CRITICAL)
def testsuite_load(): dt_cfg.load_config_files(constants.CONF_PATH) Testsuite.load()
testcase_list = get_testcase_list(logger, **kwargs) dovetail_home = os.environ['DOVETAIL_HOME'] testcases_file = os.path.join(dovetail_home, 'results', 'testcases.json') with open(testcases_file, "w") as f: data = {'testsuite': kwargs['testsuite'], 'testcases': testcase_list} f.write(json.dumps(data) + '\n') if not testcase_list: raise SystemExit(EXIT_RUN_FAILED) run_test(testcase_list, kwargs['report'], logger) dt_cfg.load_config_files(constants.CONF_PATH) dovetail_config = copy.deepcopy(dt_cfg.dovetail_config) CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) if dovetail_config['cli']['options'] is not None: for key, value in dovetail_config['cli']['options'].items(): if value is not None: for _, v in value.items(): flags = v['flags'] v.pop('flags') v.pop('path', None) main = click.option(*flags, **v)(main) if dovetail_config['cli']['arguments'] is not None: for key, value in dovetail_config['cli']['arguments'].items(): if value is not None: for _, v in value.items(): flags = v['flags']