test_grep_basic_search_python_fallback() — langchain Function Reference
Architecture documentation for the test_grep_basic_search_python_fallback() function in test_file_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2e2518f5_1068_68a1_ae83_7fca3e90f48a["test_grep_basic_search_python_fallback()"] 3358c7da_0c80_0cf4_72fe_8cc779a1ec74["TestFilesystemGrepSearch"] 2e2518f5_1068_68a1_ae83_7fca3e90f48a -->|defined in| 3358c7da_0c80_0cf4_72fe_8cc779a1ec74 style 2e2518f5_1068_68a1_ae83_7fca3e90f48a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py lines 61–75
def test_grep_basic_search_python_fallback(self, tmp_path: Path) -> None:
"""Test basic grep search using Python fallback."""
(tmp_path / "file1.py").write_text("def hello():\n pass\n", encoding="utf-8")
(tmp_path / "file2.py").write_text("def world():\n pass\n", encoding="utf-8")
(tmp_path / "file3.txt").write_text("hello world\n", encoding="utf-8")
middleware = FilesystemFileSearchMiddleware(root_path=str(tmp_path), use_ripgrep=False)
assert isinstance(middleware.grep_search, StructuredTool)
assert middleware.grep_search.func is not None
result = middleware.grep_search.func(pattern="hello")
assert "/file1.py" in result
assert "/file3.txt" in result
assert "/file2.py" not in result
Domain
Subdomains
Source
Frequently Asked Questions
What does test_grep_basic_search_python_fallback() do?
test_grep_basic_search_python_fallback() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py.
Where is test_grep_basic_search_python_fallback() defined?
test_grep_basic_search_python_fallback() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py at line 61.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free