From 08ef71a74ec4ca54969cb15cad2360189460fd42 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:33:14 +1100 Subject: [PATCH] fix(tests): mark non-test-case classes as such Because their names start with "test", we need to use `__test__ = False` to tell pytest to not treat them as test cases. --- tests/nodes/test_nodes.py | 2 ++ tests/nodes/test_sqlite.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/nodes/test_nodes.py b/tests/nodes/test_nodes.py index 4a66d9bcac..bca4e1011f 100644 --- a/tests/nodes/test_nodes.py +++ b/tests/nodes/test_nodes.py @@ -119,6 +119,7 @@ def create_edge(from_id: str, from_field: str, to_id: str, to_field: str) -> Edg class TestEvent: event_name: str payload: Any + __test__ = False # not a pytest test case def __init__(self, event_name: str, payload: Any): self.event_name = event_name @@ -127,6 +128,7 @@ class TestEvent: class TestEventService(EventServiceBase): events: list + __test__ = False # not a pytest test case def __init__(self): super().__init__() diff --git a/tests/nodes/test_sqlite.py b/tests/nodes/test_sqlite.py index 9d2d6d5cd3..439f6d0dd2 100644 --- a/tests/nodes/test_sqlite.py +++ b/tests/nodes/test_sqlite.py @@ -10,6 +10,7 @@ from invokeai.backend.util.logging import InvokeAILogger class TestModel(BaseModel): id: str = Field(description="ID") name: str = Field(description="Name") + __test__ = False # not a pytest test case @pytest.fixture