File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,25 @@ def test_single_title_edit_apply(self, mock_write):
176176 )
177177 assert list (self .album .items ())[- 1 ].title == "modified t\u00ef tle 9"
178178
179+ def test_title_edit_keep_editing_then_apply (self , mock_write ):
180+ """Edit titles, keep editing once, then apply changes."""
181+ # First, choose "keep editing" so changes are reverted in memory but
182+ # kept in the YAML file; then choose "apply" to commit them.
183+ self .run_mocked_command (
184+ {"replacements" : {"t\u00ef tle" : "modified t\u00ef tle" }},
185+ # keep Editing, then Apply
186+ ["e" , "a" ],
187+ )
188+
189+ # Writes should only happen once per track, when we finally apply.
190+ assert mock_write .call_count == self .TRACK_COUNT
191+ # All item titles (and mtimes) should now reflect the modified values.
192+ self .assertItemFieldsModified (
193+ self .album .items (),
194+ self .items_orig ,
195+ ["title" , "mtime" ],
196+ )
197+
179198 def test_noedit (self , mock_write ):
180199 """Do not edit anything."""
181200 # Do not edit anything.
You can’t perform that action at this time.
0 commit comments