refactor(test): live_gui workspace via tmp_path_factory
This commit is contained in:
+3
-3
@@ -444,7 +444,7 @@ class _LiveGuiHandle:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def live_gui() -> Generator["_LiveGuiHandle", None, None]:
|
def live_gui(request, tmp_path_factory) -> Generator["_LiveGuiHandle", None, None]:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@@ -455,8 +455,8 @@ def live_gui() -> Generator["_LiveGuiHandle", None, None]:
|
|||||||
diag = VerificationLogger("live_gui_startup", "live_gui_diag")
|
diag = VerificationLogger("live_gui_startup", "live_gui_diag")
|
||||||
diag.log_state("GUI Script", "N/A", "gui_2.py")
|
diag.log_state("GUI Script", "N/A", "gui_2.py")
|
||||||
|
|
||||||
# 1. Create a isolated workspace for the live GUI
|
# 1. Create a isolated workspace for the live GUI (in pytest tmp dir, not project tree)
|
||||||
temp_workspace = Path("tests/artifacts/live_gui_workspace")
|
temp_workspace = tmp_path_factory.mktemp("live_gui_workspace")
|
||||||
if temp_workspace.exists():
|
if temp_workspace.exists():
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user