mirror of
https://github.com/TencentCloud/Octop.git
synced 2026-10-29 07:42:51 +08:00
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>
23 lines
836 B
Python
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
|