fix: editor cleanup on Escape/reject + stop main audition on open

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
EthanfelandClaude Opus 4.8 committed 2026-07-02 18:41:41 +02:00
1 parent 4a34a87d37
commit d8b890d679
2 files changed
+21 -1

No files matched your search

+11
View File
@@ -749,3 +749,14 @@ def test_editor_close_cleans_temps(win, tmp_path):
dlg.close()
assert not t1.exists()
assert os.path.exists(str(src)) # _versions[0] (entry temp) is NOT swept by the editor
def test_editor_reject_cleans_temps(win, tmp_path):
import main as m
src = tmp_path / "v0.wav"; src.write_bytes(b"")
t1 = tmp_path / "t1.wav"; t1.write_bytes(b"x")
dlg = m.AudioEditorDialog(str(src), parent=win)
dlg._temps.add(str(t1))
dlg.reject() # Escape path
assert not t1.exists() # op temp swept
assert os.path.exists(str(src)) # entry temp (_versions[0]) survives