MCPcopy
hub / github.com/urllib3/urllib3 / test_timeout_default_resolve

Method test_timeout_default_resolve

test/test_util.py:713–720  ·  view source on GitHub ↗

The timeout default is resolved when read_timeout is accessed.

(self)

Source from the content-addressed store, hash-verified

711 assert timeout.total == 5
712
713 def test_timeout_default_resolve(self) -> None:
714 """The timeout default is resolved when read_timeout is accessed."""
715 timeout = Timeout()
716 with patch("urllib3.util.timeout.getdefaulttimeout", return_value=2):
717 assert timeout.read_timeout == 2
718
719 with patch("urllib3.util.timeout.getdefaulttimeout", return_value=3):
720 assert timeout.read_timeout == 3
721
722 def test_timeout_str(self) -> None:
723 timeout = Timeout(connect=1, read=2, total=3)

Callers

nothing calls this directly

Calls 1

TimeoutClass · 0.90

Tested by

no test coverage detected