'Spawn a process, write to stdin, and check the output.'

def _test_stdinReader(self, pyExe, args, env, path):

    p = Accumulator()
    d = p.endedDeferred = defer.Deferred()
    reactor.spawnProcess(p, pyExe, args, env, path)
    p.transport.write('hello,    world')
    p.transport.closeStdin()
    def processEnded(ign):
        self.assertEqual(p.errF.getvalue(), 'err\nerr\n')
        self.assertEqual(p.outF.getvalue(), 'out\nhello,    world\nout\n')
    return d.addCallback(processEnded)
