feat: play/stop audition of the current audio region
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -386,3 +386,19 @@ def test_waveform_strip_present_and_safe(win):
|
||||
# refresh with no file loaded is a safe no-op
|
||||
win._file_path = ""
|
||||
win._on_wave_refresh()
|
||||
|
||||
|
||||
def test_audition_button_present_and_safe(win):
|
||||
from PyQt6.QtWidgets import QPushButton
|
||||
assert isinstance(win._btn_audio_play, QPushButton)
|
||||
assert win._btn_audio_play.isCheckable()
|
||||
assert win._btn_audio_play.text() == "▶ Play"
|
||||
# No file loaded -> toggling on must be a safe no-op that snaps back to unchecked.
|
||||
win._file_path = ""
|
||||
win._btn_audio_play.setChecked(True) # fires _on_audio_audition(True)
|
||||
assert win._btn_audio_play.isChecked() is False
|
||||
# Stopping when nothing is playing must be safe.
|
||||
win._stop_audition()
|
||||
assert win._btn_audio_play.isChecked() is False
|
||||
assert win._btn_audio_play.text() == "▶ Play"
|
||||
assert win._audition_proc is None
|
||||
|
||||
Reference in New Issue
Block a user