From c3b9cbc144c2d4c6f23a3e745cbdf7af5c4fa018 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Tue, 16 Oct 2018 10:43:23 +0200 Subject: add failing test re issue #249 --- _test/test_issues.py | 22 ++++++++++++++++++++-- _test/test_yamlfile.py | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to '_test') diff --git a/_test/test_issues.py b/_test/test_issues.py index 51cd5f7..39566ac 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -514,7 +514,7 @@ class TestIssues: d0 = CommentedMap([('a', 'b')]) assert d0['a'] == 'b' - def test_issue_xxx(self): + def test_issue_245(self): from ruamel.yaml import YAML inp = """ d: yes @@ -532,9 +532,27 @@ class TestIssues: print(typ, yaml.parser, yaml.resolver) assert d['d'] is True + @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError) + def test_issue_249(self): + yaml = YAML() + inp = dedent("""\ + # comment + - + - 1 + - 2 + - 3 + """) + exp = dedent("""\ + # comment + - - 1 + - 2 + - 3 + """) + yaml.round_trip(inp, outp=exp) # NOQA + # @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError) -# def test_issue_xxx(self): +# def test_issue_ xxx(self): # inp = """ # """ # d = round_trip(inp) # NOQA diff --git a/_test/test_yamlfile.py b/_test/test_yamlfile.py index 8144c74..a02fcab 100644 --- a/_test/test_yamlfile.py +++ b/_test/test_yamlfile.py @@ -117,7 +117,7 @@ class TestYAML: def test_blank_line_between_seq_items(self): round_trip(""" - # Seq with spaces in between items. + # Seq with empty lines in between items. b: - bar -- cgit v1.2.1