Formatting
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
"""Edge case tests for the Memory system."""
|
||||
import pytest
|
||||
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from unittest.mock import patch, mock_open
|
||||
|
||||
import pytest
|
||||
|
||||
from infrastructure.persistence import (
|
||||
Memory,
|
||||
LongTermMemory,
|
||||
ShortTermMemory,
|
||||
EpisodicMemory,
|
||||
init_memory,
|
||||
LongTermMemory,
|
||||
Memory,
|
||||
ShortTermMemory,
|
||||
get_memory,
|
||||
init_memory,
|
||||
set_memory,
|
||||
)
|
||||
from infrastructure.persistence.context import _memory_ctx
|
||||
@@ -390,7 +389,7 @@ class TestMemoryEdgeCases:
|
||||
def test_init_with_nonexistent_directory(self, temp_dir):
|
||||
"""Should create directory if not exists."""
|
||||
new_dir = temp_dir / "new" / "nested" / "dir"
|
||||
|
||||
|
||||
# Create parent directories first
|
||||
new_dir.mkdir(parents=True, exist_ok=True)
|
||||
memory = Memory(storage_dir=str(new_dir))
|
||||
@@ -529,7 +528,6 @@ class TestMemoryContextEdgeCases:
|
||||
|
||||
def test_context_isolation(self, temp_dir):
|
||||
"""Context should be isolated per context."""
|
||||
import asyncio
|
||||
from contextvars import copy_context
|
||||
|
||||
_memory_ctx.set(None)
|
||||
|
||||
Reference in New Issue
Block a user