Home / Function/ test_glob_with_subdirectory_path() — langchain Function Reference

test_glob_with_subdirectory_path() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9596cf87_6fea_194d_f408_8dcdd31cb2ff["test_glob_with_subdirectory_path()"]
  fedb24a7_5bdb_9630_456f_d159ddeadfa8["TestFilesystemGlobSearch"]
  9596cf87_6fea_194d_f408_8dcdd31cb2ff -->|defined in| fedb24a7_5bdb_9630_456f_d159ddeadfa8
  style 9596cf87_6fea_194d_f408_8dcdd31cb2ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py lines 175–189

    def test_glob_with_subdirectory_path(self, tmp_path: Path) -> None:
        """Test glob search starting from subdirectory."""
        (tmp_path / "src").mkdir()
        (tmp_path / "src" / "file1.py").write_text("content", encoding="utf-8")
        (tmp_path / "other").mkdir()
        (tmp_path / "other" / "file2.py").write_text("content", encoding="utf-8")

        middleware = FilesystemFileSearchMiddleware(root_path=str(tmp_path))

        assert isinstance(middleware.glob_search, StructuredTool)
        assert middleware.glob_search.func is not None
        result = middleware.glob_search.func(pattern="*.py", path="/src")

        assert "/src/file1.py" in result
        assert "/other/file2.py" not in result

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free