예제 #1
0
    def setUp(self):
        super(TestStage2, self).setUp()
        r = Reader()
        s1 = Parse1(r)
        self.parser = Parse2(s1)

        r = CPP()
        s1 = Parse1(r)
        self.cpp_parser = Parse2(s1)
예제 #2
0
 def setUp(self):
     super(TestExamples, self).setUp()
     self.reader = Reader()
     self.cpp = CPP()
     self.s1 = Parse1(self.cpp)
     self.s2 = Parse2(self.s1)
     self.s3 = Parse3(self.s2)
     self.s4 = Parse4(self.s3)
     self.s5 = Parse5(self.s4)
     self.s6 = Parse6(self.s5)
     self.s7 = Parse7(self.s6)
     self.s8 = Parse8(self.s7)
     self.s9 = Parse9(self.s8)
     self.s10 = Parse10(self.s9)
     assert all([hasattr(self, p) for p in PARSERS])
    def setUp(self):
        super(TestExamples, self).setUp()
        self.reader = Reader()
        self.cpp = CPP()
        self.s1 = Parse1(self.cpp)
        self.s2 = Parse2(self.s1)
        self.s3 = Parse3(self.s2)
        self.s4 = Parse4(self.s3)
        self.s5 = Parse5(self.s4)
        self.s6 = Parse6(self.s5)
        self.s7 = Parse7(self.s6)

        # initialise a dtb query parser
        dtbQuery = DtbMatchQuery()
        dtbQuery.parse_args(
            ['--dtb', os.path.join(os.path.dirname(ME), "test.dtb")])
        dtbQuery.check_options()

        self.s71 = QueryParseStage(self.s7,
                                   {dtbQuery.get_query_name(): dtbQuery})
        self.s8 = Parse8(self.s71)
        self.s9 = Parse9(self.s8)
        self.s10 = Parse10(self.s9)
        assert all([hasattr(self, p) for p in PARSERS])