Home / Function/ test_grep_output_mode_count() — langchain Function Reference

test_grep_output_mode_count() — langchain Function Reference

Architecture documentation for the test_grep_output_mode_count() function in test_file_search.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  77c884a0_34b0_99a4_8558_6afb4a6be9c3["test_grep_output_mode_count()"]
  3358c7da_0c80_0cf4_72fe_8cc779a1ec74["TestFilesystemGrepSearch"]
  77c884a0_34b0_99a4_8558_6afb4a6be9c3 -->|defined in| 3358c7da_0c80_0cf4_72fe_8cc779a1ec74
  style 77c884a0_34b0_99a4_8558_6afb4a6be9c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py lines 103–113

    def test_grep_output_mode_count(self, tmp_path: Path) -> None:
        """Test grep search with count output mode."""
        (tmp_path / "test.py").write_text("hello\nhello\nworld\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", output_mode="count")

        assert "/test.py:2" in result

Domain

Subdomains

Frequently Asked Questions

What does test_grep_output_mode_count() do?
test_grep_output_mode_count() 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_output_mode_count() defined?
test_grep_output_mode_count() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py at line 103.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free