diff options
Diffstat (limited to 'test_llamachat.py')
| -rwxr-xr-x | test_llamachat.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test_llamachat.py b/test_llamachat.py index 04c1bc5..20aea57 100755 --- a/test_llamachat.py +++ b/test_llamachat.py @@ -497,6 +497,29 @@ def test_markdown_rendering(): print("ok markdown rendering") +def test_audio_bubble_marker(): + """A discarded recording shows as a voice note, not a missing file.""" + import os + + os.environ.setdefault("QT_QPA_PLATFORM", "offscreen") + from PySide6.QtWidgets import QApplication + + from llamachat.ui import _bubble_html + + app = QApplication.instance() or QApplication([]) + assert app is not None + + rendered = _bubble_html( + "user", + "Listen to this audio and respond.", + saved_rows=[{"kind": "audio", "path": "voice-note-4s.wav"}], + ) + assert "🎙 voice-note-4s.wav" in rendered + # The synthetic path is not on disk, so it must not read as missing. + assert "missing" not in rendered + print("ok audio bubble marker") + + def test_unbalanced_backticks(): """An odd backtick cannot reflow the rest of a reply as code.""" import os @@ -4041,6 +4064,7 @@ if __name__ == "__main__": test_session_prompt_storage() test_prompt_column_migration() test_markdown_rendering() + test_audio_bubble_marker() test_unbalanced_backticks() test_sidebar_toggle() test_shortcuts() |
