Skip to content

Commit

Permalink
fix: hopefully finally fixed rag tests now
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 19, 2024
1 parent 75787da commit 57e49e7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
22 changes: 12 additions & 10 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ youtube_transcript_api = {version = "^0.6.1", optional = true}
python-xlib = {version = "^0.33", optional = true} # for X11 interaction

# RAG
gptme-rag = {version = "^0.2.0", optional = true}
gptme-rag = {version = "^0.2.1", optional = true}
#gptme-rag = {path = "../gptme-rag", optional = true, develop = true}

# providers
Expand Down
7 changes: 2 additions & 5 deletions tests/test_tools_rag.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Tests for the RAG tool and context enhancement functionality."""

import shutil
from dataclasses import replace
from unittest.mock import Mock, patch

Expand All @@ -26,8 +25,7 @@
@pytest.fixture(scope="function")
def index_path(tmp_path):
"""Create a temporary index path."""
yield tmp_path
shutil.rmtree(tmp_path, ignore_errors=True)
return tmp_path


@pytest.fixture(scope="function")
Expand All @@ -39,8 +37,7 @@ def temp_docs(tmp_path):
doc2 = tmp_path / "doc2.md"
doc2.write_text("# Another Document\nThis document discusses testing practices.")

yield tmp_path
shutil.rmtree(tmp_path, ignore_errors=True)
return tmp_path


@pytest.fixture
Expand Down

0 comments on commit 57e49e7

Please sign in to comment.