Exemplo n.º 1
0
 def testSendBuffered(self):
     b = FakeWorkerBuilder(False, self.basedir)
     s = runprocess.RunProcess(b, stdoutCommand('hello'), self.basedir)
     s._addToBuffers('stdout', 'hello ')
     s._addToBuffers('stdout', 'world')
     s._sendBuffers()
     self.failUnlessEqual(b.updates, [{'stdout': 'hello world'}], b.show())
Exemplo n.º 2
0
 def testSendStatus(self):
     b = FakeWorkerBuilder(False, self.basedir)
     s = runprocess.RunProcess(b, stdoutCommand('hello'), self.basedir)
     s.sendStatus({'stdout': nl('hello\n')})
     self.failUnlessEqual(b.updates, [{'stdout': nl('hello\n')}], b.show())