本文整理汇总了Python中TestUtils.TestUtilsMixin.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python TestUtilsMixin.setUp方法的具体用法?Python TestUtilsMixin.setUp怎么用?Python TestUtilsMixin.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestUtils.TestUtilsMixin
的用法示例。
在下文中一共展示了TestUtilsMixin.setUp方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
TestUtilsMixin.setUp(self);
# initialize the database
self.createTable('test_ingest')
# start test ingestion
log.info("Starting Test Ingester")
self.ingester = self.ingest(self.masterHost(),
self.options.rows,
size=self.options.size)
示例2: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
handle = self.runJTest('localhost','getConfig')
out,err = handle.communicate()
log.debug(out)
log.debug(err)
assert handle.returncode==0
self.settings = TestUtilsMixin.settings.copy()
self.settings.update(eval(out))
TestUtilsMixin.setUp(self);
handle = self.runJTest(self.masterHost(),'setup')
out,err = handle.communicate()
log.debug(out)
log.debug(err)
assert handle.returncode==0
示例3: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
# ensure we have two servers
if len(self.options.hosts) == 1:
self.options.hosts.append('localhost')
self.options.hosts = self.options.hosts[:2]
TestUtilsMixin.setUp(self);
# create a table with 200 splits
import tempfile
fileno, filename = tempfile.mkstemp()
fp = os.fdopen(fileno, "wb")
try:
for i in range(200):
fp.write("%08x\n" % (i * 1000))
finally:
fp.close()
self.createTable('unused', filename)
# create an empty table
self.createTable('test_ingest')
示例4: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
TestUtilsMixin.setUp(self);
示例5: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
# make sure the combiner is not there
if os.path.exists(jarPath):
os.remove(jarPath)
TestUtilsMixin.setUp(self)
示例6: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
TestUtilsMixin.setUp(self);
self.test("split","bt","8","256")
示例7: setUp
# 需要导入模块: from TestUtils import TestUtilsMixin [as 别名]
# 或者: from TestUtils.TestUtilsMixin import setUp [as 别名]
def setUp(self):
if not os.getenv("ZOOKEEPER_HOME"):
self.fail("ZOOKEEPER_HOME environment variable is not set please set the location of ZOOKEEPER home in this environment variable")
return
TestUtilsMixin.setUp(self)