summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-15 20:49:05 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-15 20:49:05 +0200
commitaaaebefa965eae325adf1bfd800d91765d89fb8b (patch)
treeb86c901269d35513226554c654073e82b27abaeb
parente4aeec4e8400c054c4154dc0f885bab7368357a4 (diff)
downloadruamel.yaml-aaaebefa965eae325adf1bfd800d91765d89fb8b.tar.gz
test added re #221 add and sort with CommentedSeq
-rw-r--r--_test/test_issues.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py
index 563fdbc..19eb577 100644
--- a/_test/test_issues.py
+++ b/_test/test_issues.py
@@ -247,3 +247,24 @@ class TestIssues:
print(d)
'''
assert save_and_run(dedent(program_src), tmpdir, optimized=True) == 0
+
+ @pytest.mark.xfail(strict=True)
+ def test_issue_221_add(self):
+ from ruamel.yaml.comments import CommentedSeq
+ a = CommentedSeq([1, 2, 3])
+ a + [4, 5]
+
+ @pytest.mark.xfail(strict=True)
+ def test_issue_221_copy(self):
+ from ruamel.yaml import YAML
+ yaml = YAML()
+ inp = dedent("""\
+ - d # 4
+ - a # 1
+ - c # 3
+ - e # 5
+ - b # 2
+ """)
+ a = yaml.load(dedent(inp))
+ print(a)
+ a.sort()