def __init__(self, identifiers=('$', '@', '%', '&', '*')): utils.NormalizedDict.__init__(self, ignore=['_']) self._identifiers = identifiers importer = utils.Importer( 'variable file').import_class_or_module_by_path self._import_variable_file = partial(importer, instantiate_with_args=())
def TestLibrary(name, args=None, variables=None, create_handlers=True): with OutputCapturer(library_import=True): importer = utils.Importer('test library') libcode = importer.import_class_or_module(name) libclass = _get_lib_class(libcode) lib = libclass(libcode, name, args or [], variables) if create_handlers: lib.create_handlers() return lib
def _import_listener(self, name, args): importer = utils.Importer('listener') return importer.import_class_or_module(os.path.normpath(name), instantiate_with_args=args)