chore(tests): Final stabilization of test suite and full isolation of live_gui artifacts

This commit is contained in:
2026-03-04 01:05:56 -05:00
parent 966b5c3d03
commit 1be6193ee0
18 changed files with 7352 additions and 152 deletions

View File

@@ -1378,8 +1378,9 @@ class App:
def _test_callback_func_write_to_file(self, data: str) -> None:
"""A dummy function that a custom_callback would execute for testing."""
# Note: This file path is relative to where the test is run.
# This is for testing purposes only.
import os
# Ensure the directory exists if running from a different cwd
os.makedirs("tests/artifacts", exist_ok=True)
with open("tests/artifacts/temp_callback_output.txt", "w") as f:
f.write(data)
def _recalculate_session_usage(self) -> None:
@@ -3014,9 +3015,9 @@ class App:
entry = tool_log_filtered[i_minus_one]
script = entry["script"]
result = entry["result"]
first_line = script.split('\n')[0] if script else 'Empty Script'
imgui.text_colored(C_KEY, f"Call #{i}: {first_line}")
# Script Display
imgui.text_colored(C_LBL, "Script:")
# Script Display imgui.text_colored(C_LBL, "Script:")
imgui.same_line()
if imgui.button(f"[+]##script_{i}"):
self.show_text_viewer = True