Add a test for the diff parser that xfails

This commit is contained in:
Dave Halter
2020-04-09 00:03:39 +02:00
parent 085f666ca1
commit 93788a3e09

View File

@@ -1669,3 +1669,31 @@ def test_yet_another_backslash(differ):
differ.initialize(code1)
differ.parse(code2, parsers=ANY, copies=ANY, expect_error_leaves=True)
differ.parse(code1, parsers=ANY, copies=ANY)
@pytest.mark.xfail
def test_very_weird_indentation(differ):
"""
This test for now fails, because it's just hard to implement this, but it's
also not really important.
"""
code1 = dedent('''\
def f():
x
def g():
y
z
''')
code2 = dedent('''\
def f():
x
>\\
def g():
y
x
z
''')
differ.initialize(code1)
differ.parse(code2, parsers=1, copies=1, expect_error_leaves=True)