'Adding multiple readers and writers results in a single
C{LoopingCall}.'

def test_multipleReadersAndWriters(self):

    poller = _ContinuousPolling(Clock())
    writer = object()
    poller.addWriter(writer)
    self.assertIsNotNone(poller._loop)
    poller.addWriter(object())
    self.assertIsNotNone(poller._loop)
    poller.addReader(object())
    self.assertIsNotNone(poller._loop)
    poller.addReader(object())
    poller.removeWriter(writer)
    self.assertIsNotNone(poller._loop)
    self.assertTrue(poller._loop.running)
    self.assertEqual(len(poller._reactor.getDelayedCalls()), 1)
