Files
ykcheungab b1cd37148c 删掉回放的五个转发、重复的空格快捷键与重复的等待循环。
回放调用点直接走 replay_ctl,场景工具的路径引导收敛到 _paths,panel_snapshot
复用 panel_check 的 _wait_for,report_from 收成模块私有的 _report_from。
2026-10-07 12:25:48 +08:00

21 lines
754 B
Python

"""Put the studio and shared source trees on ``sys.path`` for the scene tools.
These tools are run as scripts out of this directory, but the tests load them by
file location (``spec_from_file_location`` + ``exec_module``), which leaves this
directory off ``sys.path``. Each tool therefore adds it before importing here.
"""
from __future__ import annotations
import sys
from pathlib import Path
def bootstrap_paths() -> None:
"""Make ``orisys_studio`` and ``orisys_app_shared`` importable from the repo."""
here = Path(__file__).resolve()
repo = here.parents[2]
for path in (repo / "apps" / "studio" / "src", repo / "shared" / "src"):
if path.is_dir() and str(path) not in sys.path:
sys.path.insert(0, str(path))