'C{reactor.removeAll()} removes all registered L{IReadDescriptor}
providers and all registered L{IWriteDescriptor} providers and returns
them.'

def test_removeAll(self):

    reactor = self.buildReactor()
    (reactor, fd, server) = self._simpleSetup()
    fd.doRead = (lambda : self.fail('doRead    should    not    be    called'))
    fd.doWrite = (lambda : self.fail('doWrite    should    not    be    called'))
    server.sendall('x')
    reactor.addReader(fd)
    reactor.addWriter(fd)
    removed = reactor.removeAll()
    reactor.callLater(0, reactor.callLater, 0, reactor.stop)
    self.runReactor(reactor)
    self.assertEqual(removed, [fd])
