Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

891 B
Raw Blame
import subprocess
import sys

import pytest

from invokeai.app.services.shared import graph as graph_module
from invokeai.app.services.shared import graph_scheduler


def test_graph_facade_reexports_scheduler_classes() -> None:
    assert graph_module._ExecutionScheduler is graph_scheduler._ExecutionScheduler
    assert graph_module._GenericGraphSchedulerAdapter is graph_scheduler._GenericGraphSchedulerAdapter


@pytest.mark.platform_independent
def test_graph_scheduler_import_does_not_import_graph_facade() -> None:
    result = subprocess.run(
        [
            sys.executable,
            "-c",
            "import sys; import invokeai.app.services.shared.graph_scheduler; "
            "print('invokeai.app.services.shared.graph' in sys.modules)",
        ],
        check=True,
        capture_output=True,
        text=True,
    )

    assert result.stdout.strip() == "False"