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

Method test_close

Lib/test/test_asyncio/test_windows_events.py:105–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103 self.set_event_loop(self.loop)
104
105 def test_close(self):
106 a, b = socket.socketpair()
107 trans = self.loop._make_socket_transport(a, asyncio.Protocol())
108 f = asyncio.ensure_future(self.loop.sock_recv(b, 100), loop=self.loop)
109 trans.close()
110 self.loop.run_until_complete(f)
111 self.assertEqual(f.result(), b'')
112 b.close()
113
114 def test_double_bind(self):
115 ADDRESS = r'\\.\pipe\test_double_bind-%s' % os.getpid()

Callers

nothing calls this directly

Calls 7

socketpairMethod · 0.45
sock_recvMethod · 0.45
closeMethod · 0.45
run_until_completeMethod · 0.45
assertEqualMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected