test_search_with_single_store() — langchain Function Reference
Architecture documentation for the test_search_with_single_store() function in test_file_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a98d8591_a74f_addf_6b3d_7a3cc2ee16a5["test_search_with_single_store()"] d14e334f_5741_3f09_dcc5_cbb464236d19["TestSearchWithDifferentBackends"] a98d8591_a74f_addf_6b3d_7a3cc2ee16a5 -->|defined in| d14e334f_5741_3f09_dcc5_cbb464236d19 style a98d8591_a74f_addf_6b3d_7a3cc2ee16a5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py lines 517–549
def test_search_with_single_store(self) -> None:
"""Test searching with a specific state key."""
middleware = StateFileSearchMiddleware(state_key="text_editor_files")
state: AnthropicToolsState = {
"messages": [],
"text_editor_files": {
"/src/main.py": {
"content": ["code"],
"created_at": "2025-01-01T00:00:00",
"modified_at": "2025-01-01T00:00:00",
},
},
"memory_files": {
"/memories/notes.txt": {
"content": ["notes"],
"created_at": "2025-01-01T00:00:00",
"modified_at": "2025-01-01T00:00:00",
},
},
}
result = middleware._handle_grep_search(
pattern=r".*",
path="/",
include=None,
output_mode="files_with_matches",
state=state,
)
assert isinstance(result, str)
assert "/src/main.py" in result
assert "/memories/notes.txt" not in result
Domain
Subdomains
Source
Frequently Asked Questions
What does test_search_with_single_store() do?
test_search_with_single_store() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py.
Where is test_search_with_single_store() defined?
test_search_with_single_store() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py at line 517.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free