Home / Function/ test_detect_valid_email() — langchain Function Reference

test_detect_valid_email() — langchain Function Reference

Architecture documentation for the test_detect_valid_email() function in test_pii.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  51fe9c38_aa1b_5f24_a804_bb006c7082a5["test_detect_valid_email()"]
  86da6b6e_fd60_6255_80b9_e736a26b0ee4["TestEmailDetection"]
  51fe9c38_aa1b_5f24_a804_bb006c7082a5 -->|defined in| 86da6b6e_fd60_6255_80b9_e736a26b0ee4
  style 51fe9c38_aa1b_5f24_a804_bb006c7082a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py lines 31–39

    def test_detect_valid_email(self) -> None:
        content = "Contact me at john.doe@example.com for more info."
        matches = detect_email(content)

        assert len(matches) == 1
        assert matches[0]["type"] == "email"
        assert matches[0]["value"] == "john.doe@example.com"
        assert matches[0]["start"] == 14
        assert matches[0]["end"] == 34

Domain

Subdomains

Frequently Asked Questions

What does test_detect_valid_email() do?
test_detect_valid_email() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py.
Where is test_detect_valid_email() defined?
test_detect_valid_email() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free