本文整理匯總了Python中TestUtils.TestUtilsMixin類的典型用法代碼示例。如果您正苦於以下問題:Python TestUtilsMixin類的具體用法?Python TestUtilsMixin怎麽用?Python TestUtilsMixin使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TestUtilsMixin類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setUp
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
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
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: tearDown
def tearDown(self):
TestUtilsMixin.tearDown(self);
示例5: setUp
def setUp(self):
TestUtilsMixin.setUp(self);
示例6: tearDown
def tearDown(self):
TestUtilsMixin.tearDown(self)
os.unlink(self.splitfile)
示例7: setUp
def setUp(self):
# make sure the combiner is not there
if os.path.exists(jarPath):
os.remove(jarPath)
TestUtilsMixin.setUp(self)
示例8: setUp
def setUp(self):
TestUtilsMixin.setUp(self);
self.test("split","bt","8","256")
示例9: tearDown
def tearDown(self):
TestUtilsMixin.tearDown(self)
self.pkill(self.masterHost(), 'TestIngest')
示例10: setUp
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)