From 418445755424ad52a9ce84e27b111fe2c963de5b Mon Sep 17 00:00:00 2001 From: lesh Date: Sat, 23 Aug 2025 13:15:40 +0300 Subject: [PATCH] disabled old agent tests --- dimos/agents/memory/test_image_embedding.py | 3 ++ dimos/agents/test_agent_image_message.py | 34 ++++++++++----------- dimos/agents/test_agent_message_streams.py | 3 ++ dimos/agents/test_agent_tools.py | 3 ++ dimos/agents/test_agent_with_modules.py | 1 + dimos/agents/test_base_agent_text.py | 8 +++++ dimos/agents/test_conversation_history.py | 7 +++++ dimos/agents/test_gateway.py | 4 +++ dimos/agents/test_simple_agent_module.py | 2 ++ pyproject.toml | 5 +-- 10 files changed, 50 insertions(+), 20 deletions(-) diff --git a/dimos/agents/memory/test_image_embedding.py b/dimos/agents/memory/test_image_embedding.py index c424b950bb..0a28ac11b7 100644 --- a/dimos/agents/memory/test_image_embedding.py +++ b/dimos/agents/memory/test_image_embedding.py @@ -32,6 +32,7 @@ class TestImageEmbedding: """Test class for CLIP image embedding functionality.""" + @pytest.mark.tofix def test_clip_embedding_initialization(self): """Test CLIP embedding provider initializes correctly.""" try: @@ -44,6 +45,7 @@ def test_clip_embedding_initialization(self): except Exception as e: pytest.skip(f"Skipping test due to model initialization error: {e}") + @pytest.mark.tofix def test_clip_embedding_process_video(self): """Test CLIP embedding provider can process video frames and return embeddings.""" try: @@ -148,6 +150,7 @@ def on_completed(): except Exception as e: pytest.fail(f"Test failed with error: {e}") + @pytest.mark.tofix def test_clip_embedding_similarity(self): """Test CLIP embedding similarity search and text-to-image queries.""" try: diff --git a/dimos/agents/test_agent_image_message.py b/dimos/agents/test_agent_image_message.py index d29b22b4e2..cf6575e913 100644 --- a/dimos/agents/test_agent_image_message.py +++ b/dimos/agents/test_agent_image_message.py @@ -15,23 +15,25 @@ """Test BaseAgent with AgentMessage containing images.""" +import logging import os + import numpy as np -from dotenv import load_dotenv import pytest +from dotenv import load_dotenv -from dimos.agents.modules.base import BaseAgent from dimos.agents.agent_message import AgentMessage +from dimos.agents.modules.base import BaseAgent from dimos.msgs.sensor_msgs import Image from dimos.msgs.sensor_msgs.Image import ImageFormat from dimos.utils.logging_config import setup_logger -import logging logger = setup_logger("test_agent_image_message") # Enable debug logging for base module logging.getLogger("dimos.agents.modules.base").setLevel(logging.DEBUG) +@pytest.mark.tofix def test_agent_single_image(): """Test agent with single image in AgentMessage.""" load_dotenv() @@ -92,6 +94,7 @@ def test_agent_single_image(): agent.dispose() +@pytest.mark.tofix def test_agent_multiple_images(): """Test agent with multiple images in AgentMessage.""" load_dotenv() @@ -159,6 +162,7 @@ def test_agent_multiple_images(): agent.dispose() +@pytest.mark.tofix def test_agent_image_with_context(): """Test agent maintaining context with image queries.""" load_dotenv() @@ -207,6 +211,7 @@ def test_agent_image_with_context(): agent.dispose() +@pytest.mark.tofix def test_agent_mixed_content(): """Test agent with mixed text-only and image queries.""" load_dotenv() @@ -232,10 +237,11 @@ def test_agent_mixed_content(): msg2.add_text("What do you see? Describe the scene.") # Use first frame from rgbd_frames test data - from dimos.utils.data import get_data - from dimos.msgs.sensor_msgs import Image - from PIL import Image as PILImage import numpy as np + from PIL import Image as PILImage + + from dimos.msgs.sensor_msgs import Image + from dimos.utils.data import get_data data_path = get_data("rgbd_frames") image_path = os.path.join(data_path, "color", "00000.png") @@ -283,6 +289,7 @@ def test_agent_mixed_content(): agent.dispose() +@pytest.mark.tofix def test_agent_empty_image_message(): """Test edge case with empty parts of AgentMessage.""" load_dotenv() @@ -330,6 +337,7 @@ def test_agent_empty_image_message(): agent.dispose() +@pytest.mark.tofix def test_agent_non_vision_model_with_images(): """Test that non-vision models handle image input gracefully.""" load_dotenv() @@ -366,12 +374,13 @@ def test_agent_non_vision_model_with_images(): agent.dispose() +@pytest.mark.tofix def test_mock_agent_with_images(): """Test mock agent with images for CI.""" # This test doesn't need API keys - from dimos.agents.test_base_agent_text import MockAgent from dimos.agents.agent_types import AgentResponse + from dimos.agents.test_base_agent_text import MockAgent # Create mock agent agent = MockAgent(model="mock::vision", system_prompt="Mock vision agent") @@ -393,14 +402,3 @@ def test_mock_agent_with_images(): # Clean up agent.dispose() - - -if __name__ == "__main__": - test_agent_single_image() - test_agent_multiple_images() - test_agent_image_with_context() - test_agent_mixed_content() - test_agent_empty_image_message() - test_agent_non_vision_model_with_images() - test_mock_agent_with_images() - print("\n✅ All image message tests passed!") diff --git a/dimos/agents/test_agent_message_streams.py b/dimos/agents/test_agent_message_streams.py index c41b657293..a84a0ed48e 100644 --- a/dimos/agents/test_agent_message_streams.py +++ b/dimos/agents/test_agent_message_streams.py @@ -167,6 +167,7 @@ def get_responses(self): return self.responses +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_agent_message_video_stream(): @@ -250,6 +251,7 @@ async def test_agent_message_video_stream(): dimos.shutdown() +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_agent_message_multi_image(): @@ -327,6 +329,7 @@ async def test_agent_message_multi_image(): dimos.shutdown() +@pytest.mark.tofix def test_agent_message_text_only(): """Test BaseAgent with text-only AgentMessage.""" load_dotenv() diff --git a/dimos/agents/test_agent_tools.py b/dimos/agents/test_agent_tools.py index 880625fe23..5e3c021772 100644 --- a/dimos/agents/test_agent_tools.py +++ b/dimos/agents/test_agent_tools.py @@ -110,6 +110,7 @@ def get_responses(self): return self.responses +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_agent_module_with_tools(): @@ -238,6 +239,7 @@ async def test_agent_module_with_tools(): dimos.shutdown() +@pytest.mark.tofix def test_base_agent_direct_tools(): """Test BaseAgent direct usage with tools.""" load_dotenv() @@ -364,6 +366,7 @@ def dispose(self): pass +@pytest.mark.tofix def test_mock_agent_tools(): """Test mock agent with tools for CI.""" # Create skill library diff --git a/dimos/agents/test_agent_with_modules.py b/dimos/agents/test_agent_with_modules.py index 61fbf7dafa..5eefd92efe 100644 --- a/dimos/agents/test_agent_with_modules.py +++ b/dimos/agents/test_agent_with_modules.py @@ -72,6 +72,7 @@ def get_responses(self): return self.responses +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_agent_module_connections(): diff --git a/dimos/agents/test_base_agent_text.py b/dimos/agents/test_base_agent_text.py index f04e84e684..af0dd6ae4b 100644 --- a/dimos/agents/test_base_agent_text.py +++ b/dimos/agents/test_base_agent_text.py @@ -69,6 +69,7 @@ def get_responses(self): return self.responses +@pytest.mark.tofix def test_base_agent_direct_text(): """Test BaseAgent direct text usage.""" load_dotenv() @@ -116,6 +117,7 @@ def test_base_agent_direct_text(): agent.dispose() +@pytest.mark.tofix @pytest.mark.asyncio async def test_base_agent_async_text(): """Test BaseAgent async text usage.""" @@ -148,6 +150,7 @@ async def test_base_agent_async_text(): agent.dispose() +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_base_agent_module_text(): @@ -233,6 +236,7 @@ async def test_base_agent_module_text(): ("cerebras::llama-3.3-70b", "cerebras"), ], ) +@pytest.mark.tofix def test_base_agent_providers(model, provider): """Test BaseAgent with different providers.""" load_dotenv() @@ -266,6 +270,7 @@ def test_base_agent_providers(model, provider): agent.dispose() +@pytest.mark.tofix def test_base_agent_memory(): """Test BaseAgent with memory/RAG.""" load_dotenv() @@ -365,6 +370,7 @@ def dispose(self): pass +@pytest.mark.tofix def test_mock_agent(): """Test mock agent for CI without API keys.""" # Create mock agent @@ -393,6 +399,7 @@ def test_mock_agent(): agent.dispose() +@pytest.mark.tofix def test_base_agent_conversation_history(): """Test that conversation history is properly maintained.""" load_dotenv() @@ -455,6 +462,7 @@ def test_base_agent_conversation_history(): agent.dispose() +@pytest.mark.tofix def test_base_agent_history_with_tools(): """Test conversation history with tool calls.""" load_dotenv() diff --git a/dimos/agents/test_conversation_history.py b/dimos/agents/test_conversation_history.py index 2227944061..b80892f304 100644 --- a/dimos/agents/test_conversation_history.py +++ b/dimos/agents/test_conversation_history.py @@ -32,6 +32,7 @@ logger = logging.getLogger(__name__) +@pytest.mark.tofix def test_conversation_history_basic(): """Test basic conversation history functionality.""" load_dotenv() @@ -88,6 +89,7 @@ def test_conversation_history_basic(): agent.dispose() +@pytest.mark.tofix def test_conversation_history_with_images(): """Test conversation history with multimodal content.""" load_dotenv() @@ -148,6 +150,7 @@ def test_conversation_history_with_images(): agent.dispose() +@pytest.mark.tofix def test_conversation_history_trimming(): """Test that conversation history is trimmed to max size.""" load_dotenv() @@ -206,6 +209,7 @@ def test_conversation_history_trimming(): agent.dispose() +@pytest.mark.tofix def test_conversation_history_with_tools(): """Test conversation history with tool calls.""" load_dotenv() @@ -264,6 +268,7 @@ class TestSkillLibrary(SkillLibrary): agent.dispose() +@pytest.mark.tofix def test_conversation_thread_safety(): """Test that conversation history is thread-safe.""" load_dotenv() @@ -297,6 +302,7 @@ async def run_concurrent(): agent.dispose() +@pytest.mark.tofix def test_conversation_history_formats(): """Test ConversationHistory formatting methods.""" load_dotenv() @@ -355,6 +361,7 @@ def test_conversation_history_formats(): agent.dispose() +@pytest.mark.tofix @pytest.mark.timeout(30) # Add timeout to prevent hanging def test_conversation_edge_cases(): """Test edge cases in conversation history.""" diff --git a/dimos/agents/test_gateway.py b/dimos/agents/test_gateway.py index 29b258f80b..d962ec46ad 100644 --- a/dimos/agents/test_gateway.py +++ b/dimos/agents/test_gateway.py @@ -23,6 +23,7 @@ from dimos.agents.modules.gateway import UnifiedGatewayClient +@pytest.mark.tofix @pytest.mark.asyncio async def test_gateway_basic(): """Test basic gateway functionality.""" @@ -69,6 +70,7 @@ async def test_gateway_basic(): gateway.close() +@pytest.mark.tofix @pytest.mark.asyncio async def test_gateway_streaming(): """Test gateway streaming functionality.""" @@ -109,6 +111,7 @@ async def test_gateway_streaming(): gateway.close() +@pytest.mark.tofix @pytest.mark.asyncio async def test_gateway_tools(): """Test gateway can pass tool definitions to LLM and get responses.""" @@ -153,6 +156,7 @@ async def test_gateway_tools(): gateway.close() +@pytest.mark.tofix @pytest.mark.asyncio async def test_gateway_providers(): """Test gateway with different providers.""" diff --git a/dimos/agents/test_simple_agent_module.py b/dimos/agents/test_simple_agent_module.py index 7c18b38210..2da67540d6 100644 --- a/dimos/agents/test_simple_agent_module.py +++ b/dimos/agents/test_simple_agent_module.py @@ -69,6 +69,7 @@ def clear(self): self.responses = [] +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio @pytest.mark.parametrize( @@ -150,6 +151,7 @@ async def test_simple_agent_module(model, provider): dimos.shutdown() +@pytest.mark.tofix @pytest.mark.module @pytest.mark.asyncio async def test_mock_agent_module(): diff --git a/pyproject.toml b/pyproject.toml index 701c9f2433..5af8fa590a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -216,10 +216,11 @@ markers = [ "ros: depend on ros", "lcm: tests that run actual LCM bus (can't execute in CI)", "module: tests that need to run directly as modules", - "gpu: tests that require GPU" + "gpu: tests that require GPU", + "tofix: temporarily disabled test" ] -addopts = "-v -p no:warnings -ra --color=yes -m 'not vis and not benchmark and not exclude and not tool and not needsdata and not lcm and not ros and not heavy and not gpu and not module'" +addopts = "-v -p no:warnings -ra --color=yes -m 'not vis and not benchmark and not exclude and not tool and not needsdata and not lcm and not ros and not heavy and not gpu and not module and not tofix'" asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function"