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:
Greyson Lalonde
2025-11-05 11:58:49 -05:00
29 changed files with 3156 additions and 1362 deletions

View File

@@ -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):