-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
This test demonstrates the expected functionality:
datafiles/tests/test_saving.py
Lines 408 to 450 in a51507b
def with_comments_on_list_items(expect): | |
sample = SampleWithListOfDataclasses() | |
write( | |
'tmp/sample.yml', | |
""" | |
# Header | |
items: # Subheader | |
# Section | |
- name: a # Item | |
score: 1 | |
# Section | |
- name: b # Item | |
score: 2 | |
""", | |
) | |
sample.datafile.load() | |
sample.items[1].name = 'c' | |
sample.datafile.save() | |
expect(read('tmp/sample.yml')) == dedent( | |
""" | |
# Header | |
items: # Subheader | |
# Section | |
- name: a # Item | |
score: 1 | |
# Section | |
- name: c # Item | |
score: 2 | |
""" | |
) |
This appears to be an issue with the YAML library: https://sourceforge.net/p/ruamel-yaml/tickets/318/
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed