Skip to content

Commit

Permalink
Removed test for deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
willtai committed Sep 19, 2024
1 parent 71a13a2 commit 572a187
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/unit/test_graphrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,3 @@ def test_graphrag_search_error(retriever_mock: MagicMock, llm: MagicMock) -> Non
with pytest.raises(SearchValidationError) as excinfo:
rag.search(10) # type: ignore
assert "Input should be a valid string" in str(excinfo)


def test_graphrag_search_query_deprecation_warning(
retriever_mock: MagicMock, llm: MagicMock
) -> None:
with catch_warnings(record=True) as warn_list:
rag = GraphRAG(
retriever=retriever_mock,
llm=llm,
)
with pytest.raises(ValidationError):
rag.search(query_text="Some query text")

assert len(warn_list) == 1
assert (
str(warn_list[0].message)
== "'query' is deprecated and will be removed in a future version, please use 'query_text' instead."
)

0 comments on commit 572a187

Please sign in to comment.