Home / Function/ test_iter_content_wraps_exceptions() — requests Function Reference

test_iter_content_wraps_exceptions() — requests Function Reference

Architecture documentation for the test_iter_content_wraps_exceptions() function in test_requests.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  7182f78c_145a_0f9d_f6c9_35ae4ddb3810["test_iter_content_wraps_exceptions()"]
  22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"]
  7182f78c_145a_0f9d_f6c9_35ae4ddb3810 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14
  style 7182f78c_145a_0f9d_f6c9_35ae4ddb3810 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 1502–1510

    def test_iter_content_wraps_exceptions(self, httpbin, exception, args, expected):
        r = requests.Response()
        r.raw = mock.Mock()
        # ReadTimeoutError can't be initialized by mock
        # so we'll manually create the instance with args
        r.raw.stream.side_effect = exception(*args)

        with pytest.raises(expected):
            next(r.iter_content(1024))

Domain

Subdomains

Frequently Asked Questions

What does test_iter_content_wraps_exceptions() do?
test_iter_content_wraps_exceptions() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_iter_content_wraps_exceptions() defined?
test_iter_content_wraps_exceptions() is defined in tests/test_requests.py at line 1502.

Analyze Your Own Codebase

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

Try Supermodel Free