mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tests: fix nodes tests
they now require a valid output
This commit is contained in:
parent
5a4dc9bbce
commit
f526f0ae5f
@ -34,6 +34,7 @@ from .test_nodes import (
|
|||||||
PolymorphicStringTestInvocation,
|
PolymorphicStringTestInvocation,
|
||||||
PromptCollectionTestInvocation,
|
PromptCollectionTestInvocation,
|
||||||
PromptTestInvocation,
|
PromptTestInvocation,
|
||||||
|
PromptTestInvocationOutput,
|
||||||
TextToImageTestInvocation,
|
TextToImageTestInvocation,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -509,7 +510,7 @@ def test_invocation_decorator():
|
|||||||
|
|
||||||
@invocation(invocation_type, title=title, tags=tags, category=category, version=version)
|
@invocation(invocation_type, title=title, tags=tags, category=category, version=version)
|
||||||
class TestInvocation(BaseInvocation):
|
class TestInvocation(BaseInvocation):
|
||||||
def invoke(self):
|
def invoke(self) -> PromptTestInvocationOutput:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
schema = TestInvocation.model_json_schema()
|
schema = TestInvocation.model_json_schema()
|
||||||
@ -527,7 +528,7 @@ def test_invocation_version_must_be_semver():
|
|||||||
|
|
||||||
@invocation("test_invocation_version_valid", version=valid_version)
|
@invocation("test_invocation_version_valid", version=valid_version)
|
||||||
class ValidVersionInvocation(BaseInvocation):
|
class ValidVersionInvocation(BaseInvocation):
|
||||||
def invoke(self):
|
def invoke(self) -> PromptTestInvocationOutput:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with pytest.raises(InvalidVersionError):
|
with pytest.raises(InvalidVersionError):
|
||||||
|
Loading…
Reference in New Issue
Block a user