示例#1
0
    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)
示例#2
0
    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)
示例#3
0
    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)
示例#4
0
文件: TestLaTeX2.py 项目: apre/rmtoo
    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
示例#5
0
    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