Home / Function/ test_socket_disabled() — langchain Function Reference

test_socket_disabled() — langchain Function Reference

Architecture documentation for the test_socket_disabled() function in test_pytest_config.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  dc8a7a7f_b675_b74d_0fe3_d66ce195beb1["test_socket_disabled()"]
  4bdf531a_7ad0_6ad5_7160_e1db5aad9e31["test_pytest_config.py"]
  dc8a7a7f_b675_b74d_0fe3_d66ce195beb1 -->|defined in| 4bdf531a_7ad0_6ad5_7160_e1db5aad9e31
  style dc8a7a7f_b675_b74d_0fe3_d66ce195beb1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/test_pytest_config.py lines 6–11

def test_socket_disabled() -> None:
    """This test should fail."""
    with pytest.raises(pytest_socket.SocketBlockedError):
        # Ignore S113 since we don't need a timeout here as the request
        # should fail immediately
        requests.get("https://www.example.com")  # noqa: S113

Domain

Subdomains

Frequently Asked Questions

What does test_socket_disabled() do?
test_socket_disabled() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/test_pytest_config.py.
Where is test_socket_disabled() defined?
test_socket_disabled() is defined in libs/langchain/tests/unit_tests/test_pytest_config.py at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free