summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-10-16 10:43:23 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-10-16 10:43:23 +0200
commitc3b9cbc144c2d4c6f23a3e745cbdf7af5c4fa018 (patch)
tree0e61dc44ee4082f68b1d9ebcaa664a1a57404cd0 /_test
parent65e86db5aa500b94e59720956547d71c1ef73c43 (diff)
downloadruamel.yaml-c3b9cbc144c2d4c6f23a3e745cbdf7af5c4fa018.tar.gz
add failing test re issue #249
Diffstat (limited to '_test')
-rw-r--r--_test/test_issues.py22
-rw-r--r--_test/test_yamlfile.py2
2 files changed, 21 insertions, 3 deletions
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