本文整理汇总了Python中buildbot.slave.commands.base.ShellCommand._addToBuffers方法的典型用法代码示例。如果您正苦于以下问题:Python ShellCommand._addToBuffers方法的具体用法?Python ShellCommand._addToBuffers怎么用?Python ShellCommand._addToBuffers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类buildbot.slave.commands.base.ShellCommand
的用法示例。
在下文中一共展示了ShellCommand._addToBuffers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testSendNotimeout
# 需要导入模块: from buildbot.slave.commands.base import ShellCommand [as 别名]
# 或者: from buildbot.slave.commands.base.ShellCommand import _addToBuffers [as 别名]
def testSendNotimeout(self):
basedir = "test_slave_commands_base.logging.sendNotimeout"
b = FakeSlaveBuilder(False, basedir)
s = ShellCommand(b, stdoutCommand('hello'), basedir)
data = "x" * (ShellCommand.BUFFER_SIZE + 1)
s._addToBuffers('stdout', data)
self.failUnless(len(b.updates), 1)
示例2: testSendChunked
# 需要导入模块: from buildbot.slave.commands.base import ShellCommand [as 别名]
# 或者: from buildbot.slave.commands.base.ShellCommand import _addToBuffers [as 别名]
def testSendChunked(self):
basedir = "test_slave_commands_base.logging.sendBufferedChunked"
b = FakeSlaveBuilder(False, basedir)
s = ShellCommand(b, stdoutCommand('hello'), basedir)
data = "x" * ShellCommand.CHUNK_LIMIT * 2
s._addToBuffers('stdout', data)
s._sendBuffers()
self.failUnless(len(b.updates), 2)
示例3: testSendBuffered
# 需要导入模块: from buildbot.slave.commands.base import ShellCommand [as 别名]
# 或者: from buildbot.slave.commands.base.ShellCommand import _addToBuffers [as 别名]
def testSendBuffered(self):
basedir = "test_slave_commands_base.logging.sendBuffered"
b = FakeSlaveBuilder(False, basedir)
s = ShellCommand(b, stdoutCommand('hello'), basedir)
s._addToBuffers('stdout', 'hello ')
s._addToBuffers('stdout', 'world')
s._sendBuffers()
self.failUnlessEqual(b.updates, [{'stdout': 'hello world'}])