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

Function test_connection_error

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

Source from the content-addressed store, hash-verified

40
41
42async def test_connection_error():
43 print("\n--- ConnectionError (refused) ---")
44 try:
45 await rnet.get("http://127.0.0.1:9999")
46 except rnet_errors as e:
47 print(f"Caught: {type(e).__name__}: {e}")
48 except Exception as e:
49 print(f"Other error: {type(e).__name__}: {e}")
50
51
52async def test_urlparse_error():

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected