mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-05 13:51:25 +00:00
test: isolation test suite and workflows
This commit is contained in:
@@ -4,6 +4,7 @@ import pytest
|
||||
from pathlib import Path
|
||||
|
||||
from comfy.isolation.proxies.folder_paths_proxy import FolderPathsProxy
|
||||
from tests.isolation.singleton_boundary_helpers import capture_sealed_singleton_imports
|
||||
|
||||
|
||||
class TestFolderPathsProxy:
|
||||
@@ -109,3 +110,13 @@ class TestFolderPathsProxy:
|
||||
result = proxy.get_folder_paths("checkpoints")
|
||||
# Should have at least one checkpoint path registered
|
||||
assert len(result) > 0, "Checkpoints folder paths is empty"
|
||||
|
||||
def test_sealed_child_safe_uses_rpc_without_importing_folder_paths(self, monkeypatch):
|
||||
monkeypatch.setenv("PYISOLATE_CHILD", "1")
|
||||
monkeypatch.setenv("PYISOLATE_IMPORT_TORCH", "0")
|
||||
|
||||
payload = capture_sealed_singleton_imports()
|
||||
|
||||
assert payload["temp_dir"] == "/sandbox/temp"
|
||||
assert payload["models_dir"] == "/sandbox/models"
|
||||
assert "folder_paths" not in payload["modules"]
|
||||
|
||||
Reference in New Issue
Block a user