class TestConsume(TestCase): def setUp(self): self.ob = Parser(None,None) def test_consume_token(self): self.ob.consumeToken() assert self.ob.currentFlaggedToken == Token.EOF def test_consume_token2(self): self.ob.currentFlaggedToken = 100000 self.ob.consumeToken() assert self.ob.currentFlaggedToken == Token.EOF
class TestJSSnippets(TestCase): def setUp(self): ce = CompilerEnvirons() er = ErrorReporter() self.parser = Parser(ce, er) def _parsesOk(self, instr): try: self.parser.parse(instr+"\n", None, 1) except Exception, e: print e return False return True
def setUp(self): self.ob = Parser(None,None)
def setUp(self): ce = CompilerEnvirons() er = ErrorReporter() self.parser = Parser(ce, er)