Skip to content

Commit 302c6de

Browse files
committed
fix(tests): Align test_notebook_search_no_results with actual behavior
Updates assertions in `test_notebook_search_no_results` to correctly expect a "No matches found" message object when a search query yields no matches in the notebook. The test previously expected an empty list, but the search function's logic is to return a specific message object in this scenario.
1 parent c05f849 commit 302c6de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_tools_coverage_additional_2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ async def test_notebook_search_no_results(notebook_tools, sample_notebook_path):
262262

263263
# Verify that an empty result list is returned
264264
assert isinstance(result, list)
265-
assert len(result) == 0
265+
assert len(result) == 1
266+
assert "message" in result[0]
267+
assert "No matches found" in result[0]["message"]
268+
assert "ThisTermWillNeverBeFoundInTheNotebook12345" in result[0]["message"] # Check if the query is in the message
266269

267270
if __name__ == "__main__":
268271
pytest.main()

0 commit comments

Comments
 (0)