Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwiktrammer committed Oct 15, 2024
1 parent 3a6d5ac commit d5b4955
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
5 changes: 5 additions & 0 deletions packages/ragbits-core/tests/unit/llms/factory/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sys
from pathlib import Path

# Add "llms" to sys.path
sys.path.append(str(Path(__file__).parent.parent))
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ def test_get_default_llm(monkeypatch):
"""
Test the get_llm_from_factory function.
"""
monkeypatch.setattr(
core_config, "default_llm_factory", "tests.unit.llms.factory.test_get_llm_from_factory.mock_llm_factory"
)

monkeypatch.setattr(core_config, "default_llm_factory", "factory.test_get_llm_from_factory.mock_llm_factory")

llm = get_default_llm()
assert isinstance(llm, LiteLLM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_get_llm_from_factory():
"""
Test the get_llm_from_factory function.
"""
llm = get_llm_from_factory("tests.unit.llms.factory.test_get_llm_from_factory.mock_llm_factory")
llm = get_llm_from_factory("factory.test_get_llm_from_factory.mock_llm_factory")

assert isinstance(llm, LiteLLM)
assert llm.model_name == "mock_model"
14 changes: 2 additions & 12 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5b4955

Please sign in to comment.