Test Failure: SocketBlockedError not raised in test_pytest_config.py/test_socket_disabled

### System Info

```yaml
Fedora OS 38
Podman info:
bash
host:
  arch: amd64
  buildahVersion: 1.30.0
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.7-2.fc38.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 87.93
    systemPercent: 2.6
    userPercent: 9.48
  cpus: 4
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: workstation
    version: "38"
  eventLogger: journald
  hostname: fedora
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.3.5-200.fc38.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 346042368
  memTotal: 3947089920
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.8.5-1.fc38.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.5
      commit: b6f80f766c9a89eb7b1440c0a70ab287434b17ed
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-12.fc38.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 3264212992
  swapTotal: 3946835968
  uptime: 2h 21m 51.00s (Approximately 0.08 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/cmirdesouza/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/cmirdesouza/.local/share/containers/storage
  graphRootAllocated: 238352859136
  graphRootUsed: 23042453504
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 14
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/cmirdesouza/.local/share/containers/storage/volumes
version:
  APIVersion: 4.5.1
  Built: 1685123928
  BuiltTime: Fri May 26 14:58:48 2023
  GitCommit: ""
  GoVersion: go1.20.4
  Os: linux
  OsArch: linux/amd64
  Version: 4.5.1
```
```bash
podman run -it langchain
=============================== test session starts ===============================
platform linux -- Python 3.11.2, pytest-7.3.1, pluggy-1.0.0
rootdir: /app
configfile: pyproject.toml
plugins: asyncio-0.20.3, cov-4.1.0, dotenv-0.5.2, mock-3.10.0, socket-0.6.0
asyncio: mode=Mode.STRICT
collected 769 items                                                               

tests/unit_tests/test_bash.py .s...s                                        [  0%]
tests/unit_tests/test_dependencies.py ...                                   [  1%]
tests/unit_tests/test_document_transformers.py ..                           [  1%]
tests/unit_tests/test_formatting.py ...                                     [  1%]
tests/unit_tests/test_math_utils.py .......                                 [  2%]
tests/unit_tests/test_pytest_config.py F                                    [  2%]
tests/unit_tests/test_python.py ........                                    [  3%]
tests/unit_tests/test_schema.py ......                                      [  4%]
tests/unit_tests/test_sql_database.py .....                                 [  5%]
tests/unit_tests/test_sql_database_schema.py ..                             [  5%]
tests/unit_tests/test_text_splitter.py ............................         [  9%]
tests/unit_tests/agents/test_agent.py .......                               [ 10%]
tests/unit_tests/agents/test_mrkl.py ............                           [ 11%]
tests/unit_tests/agents/test_public_api.py .                                [ 11%]
tests/unit_tests/agents/test_react.py ...                                   [ 12%]
tests/unit_tests/agents/test_serialization.py .                             [ 12%]
tests/unit_tests/agents/test_sql.py .                                       [ 12%]
tests/unit_tests/agents/test_tools.py ..........                            [ 13%]
tests/unit_tests/agents/test_types.py .                                     [ 13%]
tests/unit_tests/callbacks/test_callback_manager.py ........                [ 14%]
tests/unit_tests/callbacks/test_openai_info.py ...                          [ 15%]
tests/unit_tests/callbacks/tracers/test_base_tracer.py ...........          [ 16%]
tests/unit_tests/callbacks/tracers/test_langchain_v1.py ............        [ 18%]
tests/unit_tests/chains/test_api.py .                                       [ 18%]
tests/unit_tests/chains/test_base.py ..............                         [ 20%]
tests/unit_tests/chains/test_combine_documents.py ..........                [ 21%]
tests/unit_tests/chains/test_constitutional_ai.py .                         [ 21%]
tests/unit_tests/chains/test_conversation.py ...........                    [ 23%]
tests/unit_tests/chains/test_graph_qa.py ..                                 [ 23%]
tests/unit_tests/chains/test_hyde.py ..                                     [ 23%]
tests/unit_tests/chains/test_llm.py .....                                   [ 24%]
tests/unit_tests/chains/test_llm_bash.py .....                              [ 24%]
tests/unit_tests/chains/test_llm_checker.py .                               [ 25%]
tests/unit_tests/chains/test_llm_math.py ...                                [ 25%]
tests/unit_tests/chains/test_llm_summarization_checker.py .                 [ 25%]
tests/unit_tests/chains/test_memory.py ....                                 [ 26%]
tests/unit_tests/chains/test_natbot.py ..                                   [ 26%]
tests/unit_tests/chains/test_sequential.py ...........                      [ 27%]
tests/unit_tests/chains/test_transform.py ..                                [ 28%]
tests/unit_tests/chains/query_constructor/test_parser.py .................. [ 30%]
............                                                                [ 31%]
tests/unit_tests/chat_models/test_google_palm.py ssssssss                   [ 33%]
tests/unit_tests/client/test_runner_utils.py .............................. [ 36%]
......                                                                      [ 37%]
tests/unit_tests/docstore/test_arbitrary_fn.py .                            [ 37%]
tests/unit_tests/docstore/test_inmemory.py ....                             [ 38%]
tests/unit_tests/document_loaders/test_base.py .                            [ 38%]
tests/unit_tests/document_loaders/test_bibtex.py ssss                       [ 39%]
tests/unit_tests/document_loaders/test_bshtml.py ss                         [ 39%]
tests/unit_tests/document_loaders/test_confluence.py sssss                  [ 39%]
tests/unit_tests/document_loaders/test_csv_loader.py ....                   [ 40%]
tests/unit_tests/document_loaders/test_detect_encoding.py ss                [ 40%]
tests/unit_tests/document_loaders/test_directory.py ..                      [ 40%]
tests/unit_tests/document_loaders/test_evernote_loader.py sssssssssss       [ 42%]
tests/unit_tests/document_loaders/test_generic_loader.py ...s.              [ 43%]
tests/unit_tests/document_loaders/test_github.py .....                      [ 43%]
tests/unit_tests/document_loaders/test_json_loader.py sssss                 [ 44%]
tests/unit_tests/document_loaders/test_psychic.py ss                        [ 44%]
tests/unit_tests/document_loaders/test_readthedoc.py ....                   [ 45%]
tests/unit_tests/document_loaders/test_telegram.py .s                       [ 45%]
tests/unit_tests/document_loaders/test_trello.py sss                        [ 45%]
tests/unit_tests/document_loaders/test_web_base.py .                        [ 45%]
tests/unit_tests/document_loaders/test_youtube.py ..............            [ 47%]
tests/unit_tests/document_loaders/blob_loaders/test_filesystem_blob_loader.py . [ 47%]
.......s                                                                    [ 48%]
tests/unit_tests/document_loaders/blob_loaders/test_public_api.py .         [ 49%]
tests/unit_tests/document_loaders/blob_loaders/test_schema.py ............. [ 50%]
.                                                                           [ 50%]
tests/unit_tests/document_loaders/loaders/vendors/test_docugami.py s.       [ 51%]
tests/unit_tests/document_loaders/parsers/test_generic.py ..                [ 51%]
tests/unit_tests/document_loaders/parsers/test_html_parsers.py s            [ 51%]
tests/unit_tests/document_loaders/parsers/test_pdf_parsers.py ssss          [ 52%]
tests/unit_tests/document_loaders/parsers/test_public_api.py .              [ 52%]
tests/unit_tests/evaluation/qa/test_eval_chain.py ...                       [ 52%]
tests/unit_tests/llms/test_base.py ..                                       [ 52%]
tests/unit_tests/llms/test_callbacks.py ...                                 [ 53%]
tests/unit_tests/llms/test_loading.py .                                     [ 53%]
tests/unit_tests/llms/test_utils.py ..                                      [ 53%]
tests/unit_tests/memory/test_combined_memory.py ..                          [ 53%]
tests/unit_tests/memory/chat_message_histories/test_file.py ...             [ 54%]
tests/unit_tests/memory/chat_message_histories/test_sql.py ...              [ 54%]
tests/unit_tests/memory/chat_message_histories/test_zep.py ssssss           [ 55%]
tests/unit_tests/output_parsers/test_base_output_parser.py ................ [ 57%]
.......                                                                     [ 58%]
tests/unit_tests/output_parsers/test_boolean_parser.py .                    [ 58%]
tests/unit_tests/output_parsers/test_combining_parser.py .                  [ 58%]
tests/unit_tests/output_parsers/test_datetime_parser.py .                   [ 58%]
tests/unit_tests/output_parsers/test_enum_parser.py .                       [ 58%]
tests/unit_tests/output_parsers/test_json.py .........                      [ 60%]
tests/unit_tests/output_parsers/test_list_parser.py ..                      [ 60%]
tests/unit_tests/output_parsers/test_pydantic_parser.py ..                  [ 60%]
tests/unit_tests/output_parsers/test_regex_dict.py .                        [ 60%]
tests/unit_tests/output_parsers/test_structured_parser.py .                 [ 60%]
tests/unit_tests/prompts/test_chat.py ......                                [ 61%]
tests/unit_tests/prompts/test_few_shot.py ..........                        [ 62%]
tests/unit_tests/prompts/test_few_shot_with_templates.py .                  [ 63%]
tests/unit_tests/prompts/test_length_based_example_selector.py ....         [ 63%]
tests/unit_tests/prompts/test_loading.py .........                          [ 64%]
tests/unit_tests/prompts/test_pipeline_prompt.py ....                       [ 65%]
tests/unit_tests/prompts/test_prompt.py ...............                     [ 67%]
tests/unit_tests/prompts/test_utils.py .                                    [ 67%]
tests/unit_tests/retrievers/test_tfidf.py sss                               [ 67%]
tests/unit_tests/retrievers/test_time_weighted_retriever.py .....           [ 68%]
tests/unit_tests/retrievers/test_zep.py ss                                  [ 68%]
tests/unit_tests/retrievers/self_query/test_pinecone.py ..                  [ 68%]
tests/unit_tests/tools/test_base.py .................................       [ 73%]
tests/unit_tests/tools/test_exported.py .                                   [ 73%]
tests/unit_tests/tools/test_json.py ....                                    [ 73%]
tests/unit_tests/tools/test_public_api.py .                                 [ 73%]
tests/unit_tests/tools/test_signatures.py ................................. [ 78%]
...............................................                             [ 84%]
tests/unit_tests/tools/test_zapier.py ...                                   [ 84%]
tests/unit_tests/tools/file_management/test_copy.py ...                     [ 85%]
tests/unit_tests/tools/file_management/test_file_search.py ...              [ 85%]
tests/unit_tests/tools/file_management/test_list_dir.py ...                 [ 85%]
tests/unit_tests/tools/file_management/test_move.py ...                     [ 86%]
tests/unit_tests/tools/file_management/test_read.py ..                      [ 86%]
tests/unit_tests/tools/file_management/test_toolkit.py ....                 [ 87%]
tests/unit_tests/tools/file_management/test_utils.py .....                  [ 87%]
tests/unit_tests/tools/file_management/test_write.py ...                    [ 88%]
tests/unit_tests/tools/openapi/test_api_models.py ......................... [ 91%]
..........................                                                  [ 94%]
tests/unit_tests/tools/powerbi/test_powerbi.py .                            [ 94%]
tests/unit_tests/tools/python/test_python.py ...........                    [ 96%]
tests/unit_tests/tools/requests/test_tool.py ......                         [ 97%]
tests/unit_tests/tools/shell/test_shell.py .....                            [ 97%]
tests/unit_tests/utilities/test_graphql.py s                                [ 97%]
tests/unit_tests/utilities/test_loading.py ......                           [ 98%]
tests/unit_tests/vectorstores/test_sklearn.py ssssss                        [ 99%]
tests/unit_tests/vectorstores/test_utils.py ....                            [100%]

==================================== FAILURES =====================================
______________________________ test_socket_disabled _______________________________

    def test_socket_disabled() -> None:
        """This test should fail."""
>       with pytest.raises(pytest_socket.SocketBlockedError):
E       Failed: DID NOT RAISE <class 'pytest_socket.SocketBlockedError'>

tests/unit_tests/test_pytest_config.py:8: Failed
================================ warnings summary =================================
langchain/text_splitter.py:607
  /app/langchain/text_splitter.py:607: DeprecationWarning: invalid escape sequence '\*'
    "\n\*+\n",

langchain/text_splitter.py:706
  /app/langchain/text_splitter.py:706: DeprecationWarning: invalid escape sequence '\*'
    "\n\*\*\*+\n",

langchain/text_splitter.py:719
  /app/langchain/text_splitter.py:719: DeprecationWarning: invalid escape sequence '\c'
    "\n\\\chapter{",

langchain/text_splitter.py:720
  /app/langchain/text_splitter.py:720: DeprecationWarning: invalid escape sequence '\s'
    "\n\\\section{",

langchain/text_splitter.py:721
  /app/langchain/text_splitter.py:721: DeprecationWarning: invalid escape sequence '\s'
    "\n\\\subsection{",

langchain/text_splitter.py:722
  /app/langchain/text_splitter.py:722: DeprecationWarning: invalid escape sequence '\s'
    "\n\\\subsubsection{",

tests/unit_tests/test_document_transformers.py::test__filter_similar_embeddings
tests/unit_tests/test_math_utils.py::test_cosine_similarity_zero
tests/unit_tests/test_math_utils.py::test_cosine_similarity
tests/unit_tests/test_math_utils.py::test_cosine_similarity_top_k
tests/unit_tests/test_math_utils.py::test_cosine_similarity_score_threshold
tests/unit_tests/test_math_utils.py::test_cosine_similarity_top_k_and_score_threshold
tests/unit_tests/vectorstores/test_utils.py::test_maximal_marginal_relevance_lambda_zero
tests/unit_tests/vectorstores/test_utils.py::test_maximal_marginal_relevance_lambda_one
  /app/langchain/math_utils.py:23: RuntimeWarning: invalid value encountered in divide
    similarity = np.dot(X, Y.T) / np.outer(X_norm, Y_norm)

tests/unit_tests/test_sql_database_schema.py::test_table_info
  /app/.venv/lib/python3.11/site-packages/duckdb_engine/__init__.py:160: DuckDBEngineWarning: duckdb-engine doesn't yet support reflection on indices
    warnings.warn(

tests/unit_tests/document_loaders/test_readthedoc.py::test_main_id_main_content
tests/unit_tests/document_loaders/test_readthedoc.py::test_div_role_main
tests/unit_tests/document_loaders/test_readthedoc.py::test_custom
tests/unit_tests/document_loaders/test_readthedoc.py::test_empty
  /app/langchain/document_loaders/readthedocs.py:48: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
  
  The code that caused this warning is on line 48 of the file /app/langchain/document_loaders/readthedocs.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.
  
    _ = BeautifulSoup(

tests/unit_tests/document_loaders/test_readthedoc.py::test_main_id_main_content
tests/unit_tests/document_loaders/test_readthedoc.py::test_div_role_main
tests/unit_tests/document_loaders/test_readthedoc.py::test_custom
tests/unit_tests/document_loaders/test_readthedoc.py::test_empty
  /app/langchain/document_loaders/readthedocs.py:75: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
  
  The code that caused this warning is on line 75 of the file /app/langchain/document_loaders/readthedocs.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.
  
    soup = BeautifulSoup(data, **self.bs_kwargs)

tests/unit_tests/memory/test_combined_memory.py::test_basic_functionality
  /app/langchain/memory/combined.py:38: UserWarning: When using CombinedMemory, input keys should be so the input is known.  Was not set on chat_memory=ChatMessageHistory(messages=[]) output_key=None input_key=None return_messages=False human_prefix='Human' ai_prefix='AI' memory_key='foo'
    warnings.warn(

tests/unit_tests/memory/test_combined_memory.py::test_basic_functionality
  /app/langchain/memory/combined.py:38: UserWarning: When using CombinedMemory, input keys should be so the input is known.  Was not set on chat_memory=ChatMessageHistory(messages=[]) output_key=None input_key=None return_messages=False human_prefix='Human' ai_prefix='AI' memory_key='bar'
    warnings.warn(

tests/unit_tests/tools/shell/test_shell.py::test_shell_input_validation
  /app/langchain/tools/shell/tool.py:33: UserWarning: The shell tool has no safeguards by default. Use at your own risk.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================== slowest 5 durations ===============================
0.49s call     tests/unit_tests/test_pytest_config.py::test_socket_disabled
0.23s call     tests/unit_tests/test_sql_database_schema.py::test_table_info
0.15s call     tests/unit_tests/test_sql_database_schema.py::test_sql_database_run
0.07s call     tests/unit_tests/callbacks/tracers/test_base_tracer.py::test_tracer_llm_run
0.06s call     tests/unit_tests/document_loaders/test_readthedoc.py::test_main_id_main_content
============================= short test summary info =============================
FAILED tests/unit_tests/test_pytest_config.py::test_socket_disabled - Failed: DID NOT RAISE <class 'pytest_socket.SocketBlockedError'>
============= 1 failed, 697 passed, 71 skipped, 26 warnings in 6.13s ==============
```


### Who can help?

@vowelparrot @agola11 

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [X] Callbacks/Tracing
- [ ] Async

### Reproduction

1. git clone https://github.com/hwchase17/langchain.git
2. cd langchain
3. podman build -t langchain -f Dockerfile .
4. podman run -it langchain

### Expected behavior

All the tests will run without error.