예제 #1
0
 def setUp(self):
     self.fp = 'gio/test/test_doc_tracker'
     self.reporter = ReporterStreamConsole(1, 1)
     self.lxr = WordLexer(FileSource(self.fp),
                          FileIteratorTracking(self.fp), self.reporter)
     for x in range(0, 8):
         next(self.lxr)
예제 #2
0
 def setUp(self):
     self.fp = 'gio/test/test_doc_tracker'
     self.reporter = ReporterStreamConsole(1, 1)
     self.syn = WordSyntaxer(self.reporter)
     self.syn.tokenToString = Tokens.tokenToString
예제 #3
0
 def setUp(self):
     fp = 'gio/test/test_doc_tracker'
     self.it = FileIteratorTracking(fp)
     self.reporter = ReporterStreamConsole(0, 0)
     self.tkIt = LexerBase(FileSource(fp), self.it, self.reporter)
예제 #4
0
 def setUp(self):
     self.fp = 'test/test_doc_rubble'
     self.it = FileIteratorTracking(self.fp)
     self.reporter = ReporterStreamConsole(1, 1)
     self.tkIt = Lexer(FileSource(self.fp), self.it, self.reporter)
예제 #5
0
 def setUp(self):
     self.fp = 'test/test_doc_rubble'
     self.reporter = ReporterStreamConsole(1, 1)
     self.syn = Syntaxer(self.reporter)
예제 #6
0
 def testOffsets(self):
     rp = ReporterStreamConsole(1, 1)
     rp.error(self.msg)
     b = []
     rp.posStr(b, self.pos, False)
     self.assertEqual("".join(b), ":1/8:")
예제 #7
0
 def setUp(self):
     self.pos = Position(0, 7)
     self.msg = Message.withPos('Rain', FileSource('some/path/end.py'),
                                self.pos, 'return a')
     self.rp = ReporterStreamConsole(0, 0)
예제 #8
0
class TestReporterStreamConsole(unittest.TestCase):
    def setUp(self):
        self.pos = Position(0, 7)
        self.msg = Message.withPos('Rain', FileSource('some/path/end.py'),
                                   self.pos, 'return a')
        self.rp = ReporterStreamConsole(0, 0)

    def testerror(self):
        self.rp.error(self.msg)
        self.assertEqual(self.rp.errorCount, 1)

    def testSummary(self):
        self.rp.error(self.msg)
        self.rp.warning(self.msg)
        self.rp.info(self.msg)
        self.rp.summary()
        #self.assertEqual(self.rp.errorCount, 1)

    def testSummaryMulti(self):
        self.rp.error(self.msg)
        self.rp.error(self.msg)
        self.rp.warning(self.msg)
        self.rp.warning(self.msg)
        self.rp.info(self.msg)
        self.rp.info(self.msg)
        self.rp.summary()

    def testOffsets(self):
        rp = ReporterStreamConsole(1, 1)
        rp.error(self.msg)
        b = []
        rp.posStr(b, self.pos, False)
        self.assertEqual("".join(b), ":1/8:")
예제 #9
0
 def setUp(self):
     self.fp = 'gio/test/test_doc_tracker'
     self.reporter = ReporterStreamConsole(1, 1)
예제 #10
0
 def setUp(self):
     self.fp = 'test/test_doc_rubble'
     self.reporter = ReporterStreamConsole(1, 1)
     self.cpl = Compiler(self.reporter, BuilderAPIX64())