From f526f0ae5f9e5ef29aa49a1551ace0f9647c7911 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:24:21 +1000 Subject: [PATCH] tests: fix nodes tests they now require a valid output --- tests/test_node_graph.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_node_graph.py b/tests/test_node_graph.py index 87a4948af4..f1d96b0488 100644 --- a/tests/test_node_graph.py +++ b/tests/test_node_graph.py @@ -34,6 +34,7 @@ from .test_nodes import ( PolymorphicStringTestInvocation, PromptCollectionTestInvocation, PromptTestInvocation, + PromptTestInvocationOutput, TextToImageTestInvocation, ) @@ -509,7 +510,7 @@ def test_invocation_decorator(): @invocation(invocation_type, title=title, tags=tags, category=category, version=version) class TestInvocation(BaseInvocation): - def invoke(self): + def invoke(self) -> PromptTestInvocationOutput: pass schema = TestInvocation.model_json_schema() @@ -527,7 +528,7 @@ def test_invocation_version_must_be_semver(): @invocation("test_invocation_version_valid", version=valid_version) class ValidVersionInvocation(BaseInvocation): - def invoke(self): + def invoke(self) -> PromptTestInvocationOutput: pass with pytest.raises(InvalidVersionError):