mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
Merge branch 'main' into gl/fix/output-parser-exception-retry-logic
# Conflicts: # lib/crewai/src/crewai/llms/providers/anthropic/completion.py
This commit is contained in:
@@ -13,9 +13,7 @@ load_result = load_dotenv(override=True)
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_test_environment():
|
||||
"""Set up test environment with a temporary directory for SQLite storage."""
|
||||
import shutil
|
||||
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
|
||||
# Create the directory with proper permissions
|
||||
storage_dir = Path(temp_dir) / "crewai_test_storage"
|
||||
storage_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -42,9 +40,7 @@ def setup_test_environment():
|
||||
yield
|
||||
|
||||
os.environ.pop("CREWAI_TESTING", None)
|
||||
# Force cleanup of storage directory before tempfile context exits
|
||||
if storage_dir.exists():
|
||||
shutil.rmtree(storage_dir, ignore_errors=True)
|
||||
# TemporaryDirectory handles cleanup automatically with ignore_cleanup_errors=True
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
|
||||
Reference in New Issue
Block a user