MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / test_timeout_error

Function test_timeout_error

python/examples/exceptions.py:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32async def test_timeout_error():
33 print("\n--- TimeoutError (timeout) ---")
34 try:
35 await rnet.get("https://httpbin.org/delay/10", timeout=1)
36 except rnet_errors as e:
37 print(f"Caught: {type(e).__name__}: {e}")
38 except Exception as e:
39 print(f"Other error: {type(e).__name__}: {e}")
40
41
42async def test_connection_error():

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected