From 93788a3e097c1ca210e9547e1b5e5c125b4caab0 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 9 Apr 2020 00:03:39 +0200 Subject: [PATCH] Add a test for the diff parser that xfails --- test/test_diff_parser.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/test_diff_parser.py b/test/test_diff_parser.py index d59ad08..dc1dfca 100644 --- a/test/test_diff_parser.py +++ b/test/test_diff_parser.py @@ -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)