refactor: move src and tests from lib/crewai to root

This commit is contained in:
Greyson LaLonde
2025-09-26 22:09:32 -04:00
parent b88f065ad8
commit a717f44011
762 changed files with 218 additions and 1156 deletions

View File

@@ -0,0 +1,22 @@
"""Tests for optional imports."""
import pytest
from crewai.rag.config.optional_imports.base import _MissingProvider
from crewai.rag.config.optional_imports.providers import MissingChromaDBConfig
def test_missing_provider_raises_runtime_error():
"""Test that _MissingProvider raises RuntimeError on instantiation."""
with pytest.raises(
RuntimeError, match="provider '__missing__' requested but not installed"
):
_MissingProvider()
def test_missing_chromadb_config_raises_runtime_error():
"""Test that MissingChromaDBConfig raises RuntimeError on instantiation."""
with pytest.raises(
RuntimeError, match="provider 'chromadb' requested but not installed"
):
MissingChromaDBConfig()