예제 #1
0
    def test_production_error(self):
        production = Mock()
        production.lexer = Mock()
        production.lexer.lexdata = 'hello\nworld'
        production.lexpos = 0
        production.lineno = 1

        self.assertRaises(LingoParsingException, self.parser.p_error,
                          production)
예제 #2
0
    def test_production_error(self):
        production = Mock()
        production.lexer = Mock()
        production.lexer.lexdata = 'hello\nworld'
        production.lexpos = 0
        production.lineno = 1

        self.assertRaises(LingoParsingException,
                          self.parser.p_error,
                          production)