Skip to content

Commit

Permalink
fix #32
Browse files Browse the repository at this point in the history
  • Loading branch information
tompaton committed Jan 2, 2021
1 parent f41f182 commit 33e86bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion _test/test_comment_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ def test_map_set_comment_before_and_after_non_first_key_02(self):
compare(data, exp)

# issue 32
@pytest.mark.xfail(reason="open issue", raises=TypeError)
def test_yaml_add_eol_comment_issue_32(self):
data = load(
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/ruyaml/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def __eq__(self, other):
def _yaml_add_comment(self, comment, key=NoComment):
# type: (Any, Optional[Any]) -> None
if key is not NoComment:
self.yaml_key_comment_extend(key, comment)
self.yaml_key_comment_extend(key, comment, clear=True)
else:
self.ca.comment = comment

Expand Down

0 comments on commit 33e86bb

Please sign in to comment.