fix: make supervised pipeline timeout configurable (#185)

This commit is contained in:
Joseph Magly
2026-08-29 01:12:34 -04:00
parent 9e149bf656
commit 02cafde149
4 changed files with 46 additions and 4 deletions
+13
View File
@@ -13,10 +13,23 @@ def test_active_checkpoint_survives_cleanup_and_remains_chat_recoverable(tmp_pat
"""Exercise app state in isolation from Gradio's import-time worker sockets."""
script = r'''
import pathlib
import os
import sys
import app
assert app._pipeline_timeout_seconds() == 2700
os.environ["OBLITERATUS_PIPELINE_TIMEOUT_SECONDS"] = "7200"
assert app._pipeline_timeout_seconds() == 7200
os.environ["OBLITERATUS_PIPELINE_TIMEOUT_SECONDS"] = "invalid"
try:
app._pipeline_timeout_seconds()
except ValueError as error:
assert "must be an integer" in str(error)
else:
raise AssertionError("invalid pipeline timeout was accepted")
os.environ.pop("OBLITERATUS_PIPELINE_TIMEOUT_SECONDS")
theme = app.THEME.to_dict()["theme"]
assert theme["body_background_fill"] != theme["body_background_fill_dark"]
assert theme["body_text_color"] != theme["body_text_color_dark"]