示例#1
0
文件: html.py 项目: oscarpicas/rmtoo
 def __init__(self, topic_set, params):
     self.topic_set = topic_set
     cfg = Cfg(params)
     self.output_dir = cfg.get_value('output_directory')
     self.html_header_filename = cfg.get_value('header')
     self.html_footer_filename = cfg.get_value('footer')
     self.read_html_arts()
示例#2
0
 def __init__(self, topic_set, params):
     self.topic_set = topic_set
     cfg = Cfg(params)
     self.output_filename = cfg.get_value('output_filename')
     self.effort_factor = cfg.get_value_default('effort_factor', 1)
     self.req_ids = {}
     self.next_id = 1
示例#3
0
文件: Import.py 项目: kown7/rmtoo
 def _extract_input_dir(self, config):
     input_cfg = Cfg(config)
     sources_dirs = "topics.ts_common.sources"
     for cfg in input_cfg.get_value(sources_dirs):
         for req_idx in [
                 "requirements_dirs", "topics_dirs", "sources_dirs"
         ]:
             if req_idx in cfg[1]:
                 self._input_dir[req_idx] = cfg[1][req_idx]
示例#4
0
文件: Git.py 项目: oscarpicas/rmtoo
    def __init__(self, config):
        tracer.info("called")
        cfg = Cfg(config)
        self.__start_vers = cfg.get_value("start_vers")
        self.__end_vers = cfg.get_value("end_vers")
        self.__topic_root_node = cfg.get_value("topic_root_node")
        tracer.debug("start version [%s] end version [%s] "
                     "topic root node [%s]"
                     % (self.__start_vers, self.__end_vers,
                        self.__topic_root_node))

        # When the directory is not absolute, convert it to an
        # absolute path that it can be compared to the outcome of the
        # git.Repo. 
        self.__dirs = {}
        self.__repo_base_dir = None
        self.__repo = None
        self.__setup_directories(cfg)
示例#5
0
    def rmttest_empty_configuration(self):
        '''Checks the empty configuration with different types of parameters'''
        config = Cfg()

        with pytest.raises(RMTException):
            config.get_value("k")
        with pytest.raises(RMTException):
            config.get_value("k.i")
        with pytest.raises(RMTException):
            config.get_value("k.i.j")
        with pytest.raises(RMTException):
            config.get_value(['k'])
        with pytest.raises(RMTException):
            config.get_value(['k', 'i'])
        with pytest.raises(RMTException):
            config.get_value(['k', 'i', 'j'])
示例#6
0
    def rmttest_empty_configuration(self):
        '''Checks the empty configuration with different types of parameters'''
        config = Cfg()

        with pytest.raises(RMTException):
            config.get_value("k")
        with pytest.raises(RMTException):
            config.get_value("k.i")
        with pytest.raises(RMTException):
            config.get_value("k.i.j")
        with pytest.raises(RMTException):
            config.get_value(['k'])
        with pytest.raises(RMTException):
            config.get_value(['k', 'i'])
        with pytest.raises(RMTException):
            config.get_value(['k', 'i', 'j'])