From b14d9b76101b427fed74ef0487848ae896d1ee06 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 22 Jun 2025 02:54:08 +0100 Subject: [PATCH] ensure studio mode is disabled on test cleanup --- tests/teardown.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/teardown.py b/tests/teardown.py index f50d1fc..a90531c 100644 --- a/tests/teardown.py +++ b/tests/teardown.py @@ -9,7 +9,13 @@ import os import anyio from anyio import create_task_group -from pyslobs import ConnectionConfig, ScenesService, SlobsConnection, StreamingService +from pyslobs import ( + ConnectionConfig, + ScenesService, + SlobsConnection, + StreamingService, + TransitionsService, +) async def cleanup(conn: SlobsConnection): @@ -29,6 +35,11 @@ async def cleanup(conn: SlobsConnection): if model.recording_status != 'offline': await ss.toggle_recording() + ts = TransitionsService(conn) + model = await ts.get_model() + if model.studio_mode: + await ts.disable_studio_mode() + conn.close()