Home / Class/ TestMatchIncludePattern Class — langchain Architecture

TestMatchIncludePattern Class — langchain Architecture

Architecture documentation for the TestMatchIncludePattern class in test_file_search.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  1960b042_a3c7_59fb_556b_27020b79fec1["TestMatchIncludePattern"]
  fd751914_766d_3dc6_73f9_3e0a51985938["test_file_search.py"]
  1960b042_a3c7_59fb_556b_27020b79fec1 -->|defined in| fd751914_766d_3dc6_73f9_3e0a51985938
  2faccac1_356b_3414_07e9_8b1160958916["test_match_pattern_with_braces()"]
  1960b042_a3c7_59fb_556b_27020b79fec1 -->|method| 2faccac1_356b_3414_07e9_8b1160958916
  dd0874d2_c7dc_063e_782f_d4677baf7034["test_match_pattern_invalid_expansion()"]
  1960b042_a3c7_59fb_556b_27020b79fec1 -->|method| dd0874d2_c7dc_063e_782f_d4677baf7034

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py lines 346–357

class TestMatchIncludePattern:
    """Tests for _match_include_pattern helper function."""

    def test_match_pattern_with_braces(self) -> None:
        """Test matching with brace expansion."""
        assert _match_include_pattern("test.py", "*.{py,txt}")
        assert _match_include_pattern("test.txt", "*.{py,txt}")
        assert not _match_include_pattern("test.md", "*.{py,txt}")

    def test_match_pattern_invalid_expansion(self) -> None:
        """Test matching with pattern that cannot be expanded returns False."""
        assert not _match_include_pattern("test.py", "*.{}")

Frequently Asked Questions

What is the TestMatchIncludePattern class?
TestMatchIncludePattern is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py.
Where is TestMatchIncludePattern defined?
TestMatchIncludePattern is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_file_search.py at line 346.

Analyze Your Own Codebase

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

Try Supermodel Free