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)
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
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)
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)
def setUp(self): self.fp = 'test/test_doc_rubble' self.reporter = ReporterStreamConsole(1, 1) self.syn = Syntaxer(self.reporter)
def testOffsets(self): rp = ReporterStreamConsole(1, 1) rp.error(self.msg) b = [] rp.posStr(b, self.pos, False) self.assertEqual("".join(b), ":1/8:")
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)
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:")
def setUp(self): self.fp = 'gio/test/test_doc_tracker' self.reporter = ReporterStreamConsole(1, 1)
def setUp(self): self.fp = 'test/test_doc_rubble' self.reporter = ReporterStreamConsole(1, 1) self.cpl = Compiler(self.reporter, BuilderAPIX64())