def test_python3_octal(): parser = ParserWithRecovery(load_grammar(), u'0o660') module = parser.get_parsed_node() if is_py3: assert module.children[0].children[0].type == 'number' else: assert module.children[0].type == 'error_node'
def test_python2_octal(): parser = ParserWithRecovery(load_grammar(), u'0660') first = parser.get_parsed_node().children[0] if is_py3: assert first.type == 'error_node' else: assert first.children[0].type == 'number'
def test_python3_octal(): parser = ParserWithRecovery(load_grammar(), u'0o660') module = parser.get_parsed_node() if is_py3: assert module.children[0].children[0].type == 'number' else: assert module.children[0].type == 'error_node'
def test_python2_octal(): parser = ParserWithRecovery(load_grammar(), u'0660') first = parser.get_parsed_node().children[0] if is_py3: assert first.type == 'error_node' else: assert first.children[0].type == 'number'
def test_started_lambda_stmt(): p = ParserWithRecovery(load_grammar(), u'lambda a, b: a i') assert p.get_parsed_node().children[0].type == 'error_node'
def test_started_lambda_stmt(): p = ParserWithRecovery(load_grammar(), u'lambda a, b: a i') assert p.get_parsed_node().children[0].type == 'error_node'