'Bytes written to stderr by the spawned process are passed to the
C{errReceived} callback on the C{ProcessProtocol} passed to
C{spawnProcess}.'

def test_stderr(self):

    value = '42'
    p = Accumulator()
    d = p.endedDeferred = defer.Deferred()
    reactor.spawnProcess(p, pyExe, [pyExe, '-c', networkString("import    sys;    sys.stderr.write('{0}')".format(value))], env=None, path='/tmp', usePTY=self.usePTY)
    def processEnded(ign):
        self.assertEqual('42', p.errF.getvalue())
    return d.addCallback(processEnded)
