import importlib.util
from pathlib import Path
import time

R=Path(__file__).parent
s=importlib.util.spec_from_file_location('window','/tmp/codex/ltb1021/2026-09-15_contextra-three-channel_r01/observe.py')
w=importlib.util.module_from_spec(s);s.loader.exec_module(w)
w.R=R;w.p.R=R
time.sleep(5)
assert all(q['state']=='stopped' for q in w.p.api('/api/v1/streams')['streams'] if q['stream_id']!='web-cam08-test')
w.window('single-off',{'rtsp-test-source-02':'web-cam08-test'},24)
