def rmttest_neg_01(self): "LaTeX output: check invalid tag in topic" tcfg = TestConfig() tcfg.set_output_cfg() tvcs = TestVCS(tcfg) tfile = tvcs.get_tfile1() topic = Topic(None, u"TName", tvcs, None, tfile, None) topic.t = [ RecordEntry(u"CompleteleOther", u"My content"), ] rset = RequirementSet(tcfg) ttopic_set = TestTopicSet(rset) mconfig = self.__def_mconfig req_proc = latex2(mconfig) try: req_proc.topic_set_pre(ttopic_set) topic.execute(req_proc, "") assert False except RMTException: pass req_proc.topic_set_post(ttopic_set)
def rmttest_neg_01(self): "LaTeX output: check invalid tag in topic" tcfg = TestConfig() tcfg.set_output_cfg() tvcs = TestVCS(tcfg) tfile = tvcs.get_tfile1() topic = Topic(None, u"TName", tvcs, None, tfile, None) topic.t = [ RecordEntry(u"CompleteleOther", u"My content"), ] tmpdir = create_tmp_dir() rset = RequirementSet(tcfg) ttopic_set = TestTopicSet(rset) mconfig = { "output_filename": os.path.join(tmpdir, "TestLateX2Out.tex") } out_l2 = latex2(mconfig) try: out_l2.topic_set_pre(ttopic_set) topic.execute(out_l2, "") assert False except RMTException: pass out_l2.topic_set_post(ttopic_set) delete_tmp_dir(tmpdir)
def test_neg_01(self): "LaTeX output: check invalid tag in topic" tcfg = TestConfig() tcfg.set_output_cfg() tvcs = TestVCS(tcfg) tfile = tvcs.get_tfile1() dg = Digraph() topic = Topic(dg, "TName", tvcs, None, tfile, None) topic.t = [RecordEntry("CompleteleOther", "My content"), ] tmpdir = create_tmp_dir() rset = RequirementSet(tcfg) ttopic_set = TestTopicSet(rset) mconfig = {"output_filename": os.path.join(tmpdir, "TestLateX2Out.tex")} l2 = latex2(mconfig) try: l2.topic_set_pre(ttopic_set) topic.execute(l2, "") assert(False) except RMTException, rmte: pass
def rmttest_neg_01(self): "LaTeX output: check invalid tag in topic" tcfg = TestConfig() tcfg.set_output_cfg() tvcs = TestVCS(tcfg) tfile = tvcs.get_tfile1() topic = Topic(None, u"TName", tvcs, None, tfile, None) topic.t = [RecordEntry(u"CompleteleOther", u"My content"), ] rset = RequirementSet(tcfg) ttopic_set = TestTopicSet(rset) mconfig = self.__def_mconfig req_proc = latex2(mconfig) try: req_proc.topic_set_pre(ttopic_set) topic.execute(req_proc, "") assert False except RMTException: pass req_proc.topic_set_post(ttopic_set)
def test_neg_01(self): "Topic: (internal) check if Name tag exists" dg = Digraph() topic = Topic(None, None, dg, TestConfig(), None) try: topic.extract_name() assert(False) except RMTException, rmte: assert(rmte.id() == 62)
def test_neg_01(self): "LaTeX output: check invalid tag in topic" fd = StringIO.StringIO() topic = Topic(None, "TName", None, None) topic.t = [RecordEntry("CompleteleOther", "My content"), ] l2 = latex2([None, None]) try: l2.output_latex_topic(fd, topic, None) assert(False) except RMTException, rmte: pass
def rmttest_neg_01(self): "Topic: (internal) check if Name tag exists" dg = Digraph() tconfig = TestConfig() tconfig.set_value("topic_root_node", "/nothing/compare") tvcs = TestVCS(tconfig) tfileinfo = TestVCS.FileInfo(1) with pytest.raises(RMTException) as rmte: Topic(dg, tconfig, tvcs, None, tfileinfo, None) assert 62 == rmte.get_id()
def test_neg_01(self): "Topic: (internal) check if Name tag exists" dg = Digraph() tconfig = TestConfig() tconfig.set_value("topic_root_node", "/nothing/compare") tvcs = TestVCS(tconfig) tfileinfo = TestVCS.FileInfo(1) try: topic = Topic(dg, tconfig, tvcs, None, tfileinfo, None) assert (False) except RMTException, rmte: assert (rmte.id() == 62)
def __read_topics(self): '''Read in the topics for this topic set. Also topics are handled by the object cache. Note that the algorithm has a basic difference to the one used to read in the requirements. This one known the base topic and therefore all dependent sub-topics - the algorithm reading in the requirements just takes all the available files.''' tracer.debug("Called.") topic_base = self.__input_handler.get_topic_base_file_info( self.__commit) tracer.debug("Topic base [%s]." % topic_base) return Topic(self, self._config, self.__input_handler, self.__commit, topic_base, self.__complete_requirement_set)