def METHOD_NAME(self):
    server, client = self._connected_pair()
    ep = select.epoll(2)
    ep2 = select.epoll.fromfd(ep.fileno())
    ep2.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
    ep2.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
    events = ep.poll(1, 4)
    events2 = ep2.poll(0.9, 4)
    self.assertEqual(len(events), 2)
    self.assertEqual(len(events2), 2)
    ep.close()
    try:
        ep2.poll(1, 4)
    except IOError, e:
        self.assertEqual(e.args[0], errno.EBADF, e)
    else:
        self.fail("epoll on closed fd didn't raise EBADF")