MCPcopy Index your code
hub / github.com/python/cpython / runner

Method runner

Lib/test/test_asyncio/test_unix_events.py:1144–1172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1142 r'File descriptor .* is used by transport')
1143
1144 async def runner():
1145 tr, pr = await self.loop.create_connection(
1146 lambda: asyncio.Protocol(), sock=rsock)
1147
1148 try:
1149 cb = lambda: None
1150
1151 with assert_raises():
1152 self.loop.add_reader(rsock, cb)
1153 with assert_raises():
1154 self.loop.add_reader(rsock.fileno(), cb)
1155
1156 with assert_raises():
1157 self.loop.remove_reader(rsock)
1158 with assert_raises():
1159 self.loop.remove_reader(rsock.fileno())
1160
1161 with assert_raises():
1162 self.loop.add_writer(rsock, cb)
1163 with assert_raises():
1164 self.loop.add_writer(rsock.fileno(), cb)
1165
1166 with assert_raises():
1167 self.loop.remove_writer(rsock)
1168 with assert_raises():
1169 self.loop.remove_writer(rsock.fileno())
1170
1171 finally:
1172 tr.close()
1173
1174 rsock, wsock = socket.socketpair()
1175 try:

Callers

nothing calls this directly

Calls 7

create_connectionMethod · 0.45
add_readerMethod · 0.45
filenoMethod · 0.45
remove_readerMethod · 0.45
add_writerMethod · 0.45
remove_writerMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected