Skip to content

Add script to automatically generate API documentation #6755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add tests
  • Loading branch information
ekzhu committed Jul 7, 2025
commit 459d25c922961582a75538fdc4d9094cc0a8c1c8
14 changes: 7 additions & 7 deletions python/packages/autogen-ext/tests/memory/test_mem0.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def local_config() -> Mem0MemoryConfig:


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0")
@patch("autogen_ext.memory.mem0._mem0.Memory0")
async def test_basic_workflow(mock_mem0_class: MagicMock, local_config: Mem0MemoryConfig) -> None:
"""Test basic memory operations."""
# Setup mock
Expand Down Expand Up @@ -201,7 +201,7 @@ async def test_basic_workflow_with_cloud(mock_memory_client_class: MagicMock, cl


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0")
@patch("autogen_ext.memory.mem0._mem0.Memory0")
async def test_metadata_handling(mock_mem0_class: MagicMock, local_config: Mem0MemoryConfig) -> None:
"""Test metadata handling."""
# Setup mock
Expand Down Expand Up @@ -263,7 +263,7 @@ async def test_metadata_handling(mock_mem0_class: MagicMock, local_config: Mem0M


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0")
@patch("autogen_ext.memory.mem0._mem0.Memory0")
async def test_update_context(mock_mem0_class: MagicMock, local_config: Mem0MemoryConfig) -> None:
"""Test updating model context with retrieved memories."""
# Setup mock
Expand Down Expand Up @@ -315,7 +315,7 @@ async def test_update_context(mock_mem0_class: MagicMock, local_config: Mem0Memo


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.MemoryClient") # Patch for cloud mode
@patch("autogen_ext.memory.mem0._mem0.MemoryClient") # Patch for cloud mode
async def test_component_serialization(mock_memory_client_class: MagicMock) -> None:
"""Test serialization and deserialization of the component."""
# Setup mock
Expand Down Expand Up @@ -369,7 +369,7 @@ async def test_component_serialization(mock_memory_client_class: MagicMock) -> N


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0")
@patch("autogen_ext.memory.mem0._mem0.Memory0")
async def test_result_format_handling(mock_mem0_class: MagicMock, local_config: Mem0MemoryConfig) -> None:
"""Test handling of different result formats."""
# Setup mock
Expand Down Expand Up @@ -417,7 +417,7 @@ async def test_result_format_handling(mock_mem0_class: MagicMock, local_config:


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0")
@patch("autogen_ext.memory.mem0._mem0.Memory0")
async def test_init_with_local_config(mock_mem0_class: MagicMock, full_local_config: Dict[str, Any]) -> None:
"""Test initializing memory with local configuration."""
# Setup mock
Expand Down Expand Up @@ -448,7 +448,7 @@ async def test_init_with_local_config(mock_mem0_class: MagicMock, full_local_con


@pytest.mark.asyncio
@patch("autogen_ext.memory.mem0.Memory0") # Patches the underlying mem0.Memory class
@patch("autogen_ext.memory.mem0._mem0.Memory0") # Patches the underlying mem0.Memory class
async def test_local_config_with_memory_operations(
mock_mem0_class: MagicMock,
full_local_config: Dict[str, Any], # full_local_config fixture provides the mock config
Expand Down
Loading