Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = ["PySide6==6.11.2",
"numpy==2.3.5", "av==18.1.0"]

[project.optional-dependencies]
dev = ["pytest>=8,<10", "pytest-qt>=4.4,<5", "pyinstaller==6.22.3"]
dev = ["pytest>=8,<10", "pytest-qt>=4.4,<5", "pytest-timeout==2.4.0", "pyinstaller==6.22.3"]

[project.scripts]
autotalk = "autotalk.app:main"
Expand All @@ -25,3 +25,5 @@ packages = ["src/autotalk"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = ["audio_device: requires an available physical or virtual system audio output"]
timeout = 300
timeout_method = "thread"
1 change: 1 addition & 0 deletions tests/test_backend_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def loading_worker(tmp_path, monkeypatch):
monkeypatch.setattr(runtime, 'ensure_speech', lambda task: Path(sys.executable))
monkeypatch.setattr(runtime, 'worker_path', lambda: script)
monkeypatch.setattr(runtime, 'speech_backend', lambda: 'vllm')
monkeypatch.setattr(services, 'speech_backend', lambda: 'vllm')
return script


Expand Down
9 changes: 9 additions & 0 deletions tests/test_screen_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,18 @@ def warning(*args):
def test_closed_capture_releases_qt_objects_without_garbage_collection(qtbot, project, monkeypatch):
import shiboken6
from PySide6.QtMultimedia import QScreenCapture
# Exercise real QObject cleanup, not unsupported native capture or hardware.
monkeypatch.setattr(screen_capture.sys, 'platform', 'linux')
monkeypatch.setattr(QScreenCapture, 'start', lambda self: None)
capture = screen_capture.ScreenCapture(project)
objects = (capture.session, capture.screen, capture.sink)
capture.close()
qtbot.waitUntil(lambda: all(not shiboken6.isValid(obj) for obj in objects), timeout=1000)
assert capture.stopping.is_set()


@pytest.mark.parametrize('platform', ['darwin', 'win32'])
def test_desktop_capture_rejects_unsupported_platform(project, monkeypatch, platform):
monkeypatch.setattr(screen_capture.sys, 'platform', platform)
with pytest.raises(RuntimeError, match='Desktop audio recording currently requires Linux'):
screen_capture.ScreenCapture(project)