aboutsummaryrefslogtreecommitdiffstats
path: root/test_llamachat.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-18 20:28:07 +0200
committerDanilo M. <danix@danix.xyz>2026-09-18 20:28:07 +0200
commita830263c8fa51922ecc44a5eab7ce21d29a1ba6a (patch)
tree3cd4853f92068f48ead25483e93b5d68732743a7 /test_llamachat.py
parent122e50fb67540e24cc49b880fd78ba26ba043281 (diff)
downloadllamachat-a830263c8fa51922ecc44a5eab7ce21d29a1ba6a.tar.gz
llamachat-a830263c8fa51922ecc44a5eab7ce21d29a1ba6a.zip
feat: record control and voice-note history marker
Diffstat (limited to 'test_llamachat.py')
-rwxr-xr-xtest_llamachat.py24
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()