Skip to content

Commit c05f849

Browse files
committed
fix(tests): Align test_notebook_search_attribute_error with actual behavior
Updates assertions in `test_notebook_search_attribute_error` to correctly expect a "No matches found" message object when a cell's `source` attribute raises an AttributeError and no other search results are found. The test previously expected an empty list, but the search function's logic is to return a specific message in this scenario.
1 parent b278bda commit c05f849

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_tools_coverage_additional.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ async def test_notebook_search_attribute_error(notebook_tools, sample_notebook_p
448448

449449
# The method should handle the error and continue
450450
assert isinstance(result, list)
451-
assert len(result) == 0 # No matches found
451+
assert len(result) == 1
452+
assert "message" in result[0]
453+
assert "No matches found" in result[0]["message"]
452454

453455
@pytest.mark.asyncio
454456
async def test_notebook_search_cell_error(notebook_tools, sample_notebook_path):

0 commit comments

Comments
 (0)