Home / Function/ test_super_len_handles_files_raising_weird_errors_in_tell() — requests Function Reference

test_super_len_handles_files_raising_weird_errors_in_tell() — requests Function Reference

Architecture documentation for the test_super_len_handles_files_raising_weird_errors_in_tell() function in test_utils.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  09208fb1_7486_ca2b_21ad_feccb420ecdc["test_super_len_handles_files_raising_weird_errors_in_tell()"]
  81f7dd40_8de4_e5e3_d0f0_3d84ce7fbb59["TestSuperLen"]
  09208fb1_7486_ca2b_21ad_feccb420ecdc -->|defined in| 81f7dd40_8de4_e5e3_d0f0_3d84ce7fbb59
  19d07497_0f69_2eab_ef4d_4af9a17dd5d0["tell()"]
  09208fb1_7486_ca2b_21ad_feccb420ecdc -->|calls| 19d07497_0f69_2eab_ef4d_4af9a17dd5d0
  style 09208fb1_7486_ca2b_21ad_feccb420ecdc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_utils.py lines 73–83

    def test_super_len_handles_files_raising_weird_errors_in_tell(self, error):
        """If tell() raises errors, assume the cursor is at position zero."""

        class BoomFile:
            def __len__(self):
                return 5

            def tell(self):
                raise error()

        assert super_len(BoomFile()) == 0

Domain

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_super_len_handles_files_raising_weird_errors_in_tell() do?
test_super_len_handles_files_raising_weird_errors_in_tell() is a function in the requests codebase, defined in tests/test_utils.py.
Where is test_super_len_handles_files_raising_weird_errors_in_tell() defined?
test_super_len_handles_files_raising_weird_errors_in_tell() is defined in tests/test_utils.py at line 73.
What does test_super_len_handles_files_raising_weird_errors_in_tell() call?
test_super_len_handles_files_raising_weird_errors_in_tell() calls 1 function(s): tell.

Analyze Your Own Codebase

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

Try Supermodel Free