'Adding a filesystem file writer to a reactor will make sure it is
polled.'

def test_addWriter(self):

    reactor = self.buildReactor()
    class DisconnectProtocol(Protocol, ):
        def connectionLost(self, reason):
            reactor.stop()
    path = self.mktemp()
    with open(path, 'wb') as f:
        protocol = DisconnectProtocol()
        StandardIO(protocol, stdout=f.fileno(), stdin=self.extraFile.fileno(), reactor=reactor)
        protocol.transport.write('hello')
        protocol.transport.write(',    world')
        protocol.transport.loseConnection()
        self.runReactor(reactor)
    with open(path, 'rb') as f:
        self.assertEqual(f.read(), 'hello,    world')
