summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-07-17 09:29:01 +0200
committerAnthon van der Neut <anthon@mnt.org>2019-07-17 09:29:01 +0200
commit9eb543eb3b1512a176f12ae6e4ba46ca6acf1b84 (patch)
tree4f5d8430609c49ac7458b93ab440237f797b89ca /_test
parentc66622294833e0193895c651c393bbaf249508a9 (diff)
downloadruamel.yaml-9eb543eb3b1512a176f12ae6e4ba46ca6acf1b84.tar.gz
failing test for 295
Diffstat (limited to '_test')
-rw-r--r--_test/test_issues.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py
index 990d538..7968e74 100644
--- a/_test/test_issues.py
+++ b/_test/test_issues.py
@@ -798,6 +798,32 @@ class TestIssues:
yaml.dump(data, buf)
assert buf.getvalue() == yamldoc
+ @pytest.mark.xfail(strict=True, reason='should fail pre 0.15.100', raises=AssertionError)
+ def test_issue_295(self):
+ # deepcopy also makes a copy of the start and end mark, and these did not
+ # have any comparison beyond their ID, which of course changed, breaking
+ # some old merge_comment code
+ import copy
+
+ inp = dedent("""
+ A:
+ b:
+ # comment
+ - l1
+ - l2
+
+ C:
+ d: e
+ f:
+ # comment2
+ - - l31
+ - l32
+ - l33: '5'
+ """)
+ data = round_trip_load(inp) # NOQA
+ dc = copy.deepcopy(data)
+ assert round_trip_dump(dc) == inp
+
# @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError)
# def test_issue_ xxx(self):
# inp = """