Home / Function/ test_glob_with_base_path() — langchain Function Reference

test_glob_with_base_path() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e2735d64_0279_3da3_95ac_bf01500b0926["test_glob_with_base_path()"]
  44d048e9_39db_934c_80d9_55e1bf38366c["TestGlobSearch"]
  e2735d64_0279_3da3_95ac_bf01500b0926 -->|defined in| 44d048e9_39db_934c_80d9_55e1bf38366c
  style e2735d64_0279_3da3_95ac_bf01500b0926 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py lines 96–122

    def test_glob_with_base_path(self) -> None:
        """Test glob with base path restriction."""
        middleware = StateFileSearchMiddleware()

        state: AnthropicToolsState = {
            "messages": [],
            "text_editor_files": {
                "/src/main.py": {
                    "content": [],
                    "created_at": "2025-01-01T00:00:00",
                    "modified_at": "2025-01-01T00:00:00",
                },
                "/tests/test.py": {
                    "content": [],
                    "created_at": "2025-01-01T00:00:00",
                    "modified_at": "2025-01-01T00:00:00",
                },
            },
        }

        result = middleware._handle_glob_search(
            pattern="**/*.py", path="/src", state=state
        )

        assert isinstance(result, str)
        assert "/src/main.py" in result
        assert "/tests/test.py" not in result

Domain

Subdomains

Frequently Asked Questions

What does test_glob_with_base_path() do?
test_glob_with_base_path() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py.
Where is test_glob_with_base_path() defined?
test_glob_with_base_path() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_file_search.py at line 96.

Analyze Your Own Codebase

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

Try Supermodel Free