MCPcopy Index your code
hub / github.com/RustPython/RustPython / getaddrinfo

Method getaddrinfo

Lib/test/test_asyncio/test_events.py:801–805  ·  view source on GitHub ↗
(host, port, *args, **kwargs)

Source from the content-addressed store, hash-verified

799 getaddrinfo_orig = self.loop.getaddrinfo
800
801 async def getaddrinfo(host, port, *args, **kwargs):
802 if port == port2:
803 return [(socket.AF_INET6, socket.SOCK_STREAM, 0, '', ('::1', 0, 0, 0)),
804 (socket.AF_INET, socket.SOCK_STREAM, 0, '', ('127.0.0.1', 0))]
805 return await getaddrinfo_orig(host, port, *args, **kwargs)
806
807 self.loop.getaddrinfo = getaddrinfo
808

Calls

no outgoing calls

Tested by

no test coverage detected