'L{IProcessTransport.writeToChild} raises L{KeyError} if passed a file
descriptor which is was not set up by L{IReactorProcess.spawnProcess}.'

def test_writeToChildBadFileDescriptor(self):

    def write(transport, bytesToSend):
        try:
            self.assertRaises(KeyError, transport.writeToChild, 13, bytesToSend)
        finally:
            transport.write(bytesToSend)
    self._writeTest(write)
