summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-13 14:40:19 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-13 14:40:19 +0200
commit9bf81ebee695c0d7ea754e3937f457f3077ac5f1 (patch)
tree3be1197df479519c3dadd8c39debaa5854d94b71
parent730c6a9ff9305938ff03a512f8dfcfe019e22eca (diff)
downloadruamel.yaml-9bf81ebee695c0d7ea754e3937f457f3077ac5f1.tar.gz
failing test for issue 184
-rw-r--r--_test/test_issues.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py
index d2ea460..d17d377 100644
--- a/_test/test_issues.py
+++ b/_test/test_issues.py
@@ -86,4 +86,16 @@ class TestIssues:
def test_issue_172(self):
x = round_trip_load(TestIssues.json_str2) # NOQA
- x = round_trip_load(TestIssues.json_str) # NOQA
+ x = round_trip_load(TestIssues.json_str) # NOQA
+
+ def test_issue_184(self):
+ yaml_str = dedent("""\
+ test::test:
+ # test
+ foo:
+ bar: baz
+ """)
+ d = round_trip_load(yaml_str)
+ d['bar'] = 'foo'
+ d.yaml_add_eol_comment('test1', 'bar')
+ assert round_trip_dump(d) == yaml_str + 'bar: foo # test1\n'