def setUp(self): from engineer.conf import settings bootstrap() #bootstrap logging infrastructure load_plugins() #load plugins self.source_path = test_data_root os.chdir(self.copied_data_path) self.post_tests_dir = self.copied_data_path / 'post_tests' settings.reload(self.post_tests_dir / 'settings.yaml') settings.create_required_directories()
def setUp(self): from engineer.conf import settings bootstrap() #bootstrap logging infrastructure load_plugins() #load plugins self.source_path = test_data_root os.chdir(self.copied_data_path) self.post_tests_dir = self.copied_data_path / 'post_tests' settings.reload(self.post_tests_dir / 'settings.yaml') settings.create_required_directories()
def cmdline(args=sys.argv): # bootstrap logging bootstrap() # Load all plugins load_plugins() args = get_argparser().parse_args(args[1:]) skip_settings = ('init', ) logger = logging.getLogger('engineer') if args.verbose >= 2: logger.removeHandler(get_console_handler(logging.WARNING)) logger.addHandler(get_console_handler(logging.DEBUG)) elif args.verbose == 1: logger.removeHandler(get_console_handler(logging.WARNING)) logger.addHandler(get_console_handler(logging.INFO)) else: pass # WARNING level is added by default in bootstrap method if args.parser_name in skip_settings: pass else: # try loading settings try: from engineer.conf import settings if args.config_file is None: default_settings_file = path.getcwd() / 'config.yaml' logger.info( "No '--settings' parameter specified, defaulting to %s." % default_settings_file) settings.reload(default_settings_file) else: settings.reload(settings_file=args.config_file) except Exception as e: logger.error(e.message) exit() args.func(args) exit()
def cmdline(args=sys.argv): # bootstrap logging bootstrap() # Load all plugins load_plugins() args = get_argparser().parse_args(args[1:]) skip_settings = ('init',) logger = logging.getLogger('engineer') if args.verbose >= 2: logger.removeHandler(get_console_handler(logging.WARNING)) logger.addHandler(get_console_handler(logging.DEBUG)) elif args.verbose == 1: logger.removeHandler(get_console_handler(logging.WARNING)) logger.addHandler(get_console_handler(logging.INFO)) else: pass # WARNING level is added by default in bootstrap method if args.parser_name in skip_settings: pass else: # try loading settings try: from engineer.conf import settings if args.config_file is None: default_settings_file = path.getcwd() / 'config.yaml' logger.info("No '--settings' parameter specified, defaulting to %s." % default_settings_file) settings.reload(default_settings_file) else: settings.reload(settings_file=args.config_file) except Exception as e: logger.error(e.message) exit() args.func(args) exit()
def __init__(self, *args, **kwargs): bootstrap() super(CopyDataTestCase, self).__init__(*args, **kwargs) self.copied_data_path = None
def setUp(self): bootstrap() # bootstrap logging infrastructure load_plugins() # load plugins self.source_path = simple_site os.chdir(self.copied_data_path)
def setUp(self): bootstrap() #bootstrap logging infrastructure load_plugins() #load plugins self.source_path = simple_site os.chdir(self.copied_data_path)
def __init__(self, *args, **kwargs): bootstrap() super(CopyDataTestCase, self).__init__(*args, **kwargs) self.copied_data_path = None