Open apmorton opened 6 months ago
Given code like:
a = ( # foo, )
get_patched_ast will incorrectly scan past the empty tuple and cause MismatchedTokenError.
get_patched_ast
MismatchedTokenError
The following test case will blow up in _consume_pattern because it does not match the pattern
_consume_pattern
def test_empty_tuple_node4(self): source = "a = (\n# foo,\n)" ast_frag = patchedast.get_patched_ast(source, True) checker = _ResultChecker(self, ast_frag) checker.check_children("Tuple", ["()"])
Given code like:
get_patched_ast
will incorrectly scan past the empty tuple and causeMismatchedTokenError
.The following test case will blow up in
_consume_pattern
because it does not match the pattern