def __init__(self, name, args=None): self.name = self._get_library_name(name) if args and len(args) >= 2 and isinstance(args[-2], basestring) and args[-2].upper() == 'WITH NAME': self._alias = args[-1] args = args[:-2] try: self.keywords, self.doc = self._init_from_library(self.name, args) except (ImportError, DataError), err: specfile = utils.find_from_pythonpath(self.name + '.xml') self.keywords, self.doc = self._init_from_specfile(specfile) if not self.keywords: msg = 'Importing test library "%s" failed' % self.name RideLogException(message=msg, exception=err, level='WARN').publish()
def init_from_spec(name): return _init_from_specfile(utils.find_from_pythonpath(name + '.xml'), name)
def _find_from_pythonpath(self, name): return utils.find_from_pythonpath(name + ".xml")
def _find_from_pythonpath(self, name): return utils.find_from_pythonpath(name+'.xml')
def _get_python_path(self, name): if name not in self.python_path_cache: path_from_pythonpath = utils.find_from_pythonpath(name) self.python_path_cache[name] = path_from_pythonpath return self.python_path_cache[name]