Home / Function/ test_server_finishes_on_error() — requests Function Reference

test_server_finishes_on_error() — requests Function Reference

Architecture documentation for the test_server_finishes_on_error() function in test_testserver.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  260beb70_b423_fb75_85f4_0485194aea25["test_server_finishes_on_error()"]
  ba85c801_ef4e_5a92_0e3d_07f791306eaf["TestTestServer"]
  260beb70_b423_fb75_85f4_0485194aea25 -->|defined in| ba85c801_ef4e_5a92_0e3d_07f791306eaf
  77b5091f_26f5_443a_fd8b_425cdd5ca984["basic_response_server()"]
  260beb70_b423_fb75_85f4_0485194aea25 -->|calls| 77b5091f_26f5_443a_fd8b_425cdd5ca984
  style 260beb70_b423_fb75_85f4_0485194aea25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_testserver.py lines 144–154

    def test_server_finishes_on_error(self):
        """the server thread exits even if an exception exits the context manager"""
        server = Server.basic_response_server()
        with pytest.raises(Exception):
            with server:
                raise Exception()

        assert len(server.handler_results) == 0

        # if the server thread fails to finish, the test suite will hang
        # and get killed by the jenkins timeout.

Domain

Subdomains

Frequently Asked Questions

What does test_server_finishes_on_error() do?
test_server_finishes_on_error() is a function in the requests codebase, defined in tests/test_testserver.py.
Where is test_server_finishes_on_error() defined?
test_server_finishes_on_error() is defined in tests/test_testserver.py at line 144.
What does test_server_finishes_on_error() call?
test_server_finishes_on_error() calls 1 function(s): basic_response_server.

Analyze Your Own Codebase

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

Try Supermodel Free