Files
Octop/tests/unit/desktop/test_native_platform.py
7a7852799a feat: share experts by group and separate incoming shares from local lists (#2320)
Experts use the same audience rules as other resources, cards mark who shared them, and list filters show only what others shared with you. Host control moves under infra/control, text assist calls a host model factory, and providers can be marked for embeddings.

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 19:46:14 +08:00

23 lines
836 B
Python

"""Tests for native vs virtual desktop capture paths."""
from __future__ import annotations
from octop.infra.control.desktop.capture import ScreenCapture
from octop.infra.control.desktop.input import InputInjector
def test_mac_uses_mss_not_import(monkeypatch) -> None:
monkeypatch.setattr("octop.infra.control.desktop.capture.sys.platform", "darwin")
cap = ScreenCapture(display=None, monitor=0)
assert cap._prefer_import_capture() is False
assert cap._mss_kwargs() == {}
def test_windows_input_uses_pynput_path(monkeypatch) -> None:
monkeypatch.setattr("octop.infra.control.desktop.capture.sys.platform", "win32")
inj = InputInjector(display=None)
monkeypatch.setattr(
"octop.infra.control.desktop.input.shutil.which", lambda _: "/usr/bin/xdotool"
)
assert inj._use_xdotool() is False