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

Method test_unregister_closed

Lib/test/test_epoll.py:221–236  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

219 select.EPOLLIN)
220
221 def test_unregister_closed(self):
222 server, client = self._connected_pair()
223 fd = server.fileno()
224 ep = select.epoll(16)
225 ep.register(server)
226
227 now = time.monotonic()
228 events = ep.poll(1, 4)
229 then = time.monotonic()
230 self.assertFalse(then - now > 0.01)
231
232 server.close()
233
234 with self.assertRaises(OSError) as cm:
235 ep.unregister(fd)
236 self.assertEqual(cm.exception.errno, errno.EBADF)
237
238 def test_close(self):
239 open_file = open(__file__, "rb")

Callers

nothing calls this directly

Calls 9

_connected_pairMethod · 0.95
assertFalseMethod · 0.80
filenoMethod · 0.45
registerMethod · 0.45
pollMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45
unregisterMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected