X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8c565d86843649dc1467b5909b446021e4417bba..80bd2b3134b4f01da4e279d040a224326b3577e5:/tests/empty_lines.py?ds=sidebyside diff --git a/tests/empty_lines.py b/tests/empty_lines.py index 8f00ddc..d001db4 100644 --- a/tests/empty_lines.py +++ b/tests/empty_lines.py @@ -12,15 +12,19 @@ def f(): if t == token.COMMENT: # another trailing comment return DOUBLESPACE + assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" + prev = leaf.prev_sibling if not prev: prevp = preceding_leaf(p) if not prevp or prevp.type in OPENING_BRACKETS: + return NO + if prevp.type == token.EQUAL: if prevp.parent and prevp.parent.type in { syms.typedargslist, @@ -60,7 +64,7 @@ def g(): return DOUBLESPACE # Another comment because more comments - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" + assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}' prev = leaf.prev_sibling if not prev: @@ -86,9 +90,9 @@ def g(): def f(): - NO = '' - SPACE = ' ' - DOUBLESPACE = ' ' + NO = "" + SPACE = " " + DOUBLESPACE = " " t = leaf.type p = leaf.parent # trailing comment @@ -135,9 +139,9 @@ def f(): def g(): - NO = '' - SPACE = ' ' - DOUBLESPACE = ' ' + NO = "" + SPACE = " " + DOUBLESPACE = " " t = leaf.type p = leaf.parent