本文整理汇总了Python中Output.output方法的典型用法代码示例。如果您正苦于以下问题:Python Output.output方法的具体用法?Python Output.output怎么用?Python Output.output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output.output方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_suite_desc
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_suite_desc(self):
suite_def = suite_desc_template % ( \
get_fixture_array_name(self.suite), \
get_fixture_array_name(self.suite), \
get_fixture_array_name(self.suite) )
Output.output(suite_def, self.file)
示例2: generate_testcase_array
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_testcase_array(self):
begin = testcase_array_template_begin % (get_testcase_array_var(self.fixture))
Output.output(begin, self.file)
self.generate_testcase_array_content()
Output.output(array_template_end, self.file)
示例3: generate
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate(self):
fixture_desc_def = fixture_desc_template % ( \
get_fixture_desc_var(self.fixture), \
self.fixture.get_name(), \
os.path.basename(self.fixture.get_file_name()), \
get_testcase_array_var(self.fixture), \
get_testcase_array_var(self.fixture), \
get_testcase_array_var(self.fixture) )
Output.output(fixture_desc_def, self.file)
if self.recordFixture :
global fixtureDescs
fixtureDescs.append(get_fixture_desc_var(self.fixture))
示例4: __generate_test_def
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def __generate_test_def(self, test_invocation, name=None, index=None, group=None):
testcase_def = testcase_template % ( \
get_testcase_class_name(self.fixture, self.testcase, index), \
get_testcase_class_name(self.fixture, self.testcase, index), \
get_testcase_display_name(self.testcase, group), \
self.fixture.get_name(), \
self.suite, \
get_depends_var(self.fixture, self.testcase), \
get_file_name(self.testcase), \
self.testcase.get_line_number(), \
get_fixture_id(self.fixture), \
get_fixture_id(self.fixture), \
test_invocation, \
len(self.testcase.get_tags() + self.fixture.get_tags()), \
get_testcase_tags(self.testcase, self.fixture), \
get_fixture_id(self.fixture), \
get_testcase_instance_name(self.fixture, self.testcase, name, index) \
)
Output.output(testcase_def, self.file)
示例5: generate_fixture_array
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_fixture_array(self):
global fixtureDescs
if not self.recordFixture :
for fixtureDesc in fixtureDescs :
Output.output("extern TESTNGPP_NS::TestFixtureDesc "+fixtureDesc+";", self.file)
fixture_array_def = fixture_array_template_begin % (get_fixture_array_name(self.suite))
Output.output(fixture_array_def, self.file)
self.generate_fixture_desc_array()
if not self.recordFixture :
# output recorded fixture descs
for fixtureDesc in fixtureDescs :
Output.output("&"+fixtureDesc+",", self.file)
Output.output(array_template_end, self.file)
示例6: generate_headers
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_headers(self):
self.generate_dep_headers()
for header in self.fixture_files:
Output.output("#include \"" + os.path.relpath(header, os.path.dirname(os.path.abspath(self.target))) + "\"", self.file)
示例7: generate_dep_headers
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_dep_headers(self):
for header in dep_headers:
Output.output("#include <testngpp/" + header + ">", self.file)
示例8: generate_suite_getter
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_suite_getter(self):
suite_getter = suite_getter_template % ( get_suite_getter_name(), get_suite_desc_name(self.suite))
Output.output(suite_getter, self.file)
示例9: generate_end
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_end(self):
if self.scope.is_root_scope():
Output.output("#endif // #" + self.scope.get_inst(), self.file)
示例10: generate_begin
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_begin(self):
inst = self.scope.get_inst()
if inst != "::":
Output.output("#" + inst, self.file)
示例11: __generate
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def __generate(self, name=None, index=None):
testcase_in_array = '''&%s,''' % (get_testcase_instance_name(self.fixture, self.testcase, name, index))
Output.output(testcase_in_array, self.file)
示例12: generate_headers
# 需要导入模块: import Output [as 别名]
# 或者: from Output import output [as 别名]
def generate_headers(self):
self.generate_dep_headers()
for header in self.fixture_files:
Output.output("#include <" + header + ">", self.file)