本文整理汇总了Python中test.logger.TestLoggingHandler.create_fresh_handler方法的典型用法代码示例。如果您正苦于以下问题:Python TestLoggingHandler.create_fresh_handler方法的具体用法?Python TestLoggingHandler.create_fresh_handler怎么用?Python TestLoggingHandler.create_fresh_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test.logger.TestLoggingHandler
的用法示例。
在下文中一共展示了TestLoggingHandler.create_fresh_handler方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_loop_two_control_vars
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def test_loop_two_control_vars(self, iter_type):
# this should work the same for both iteration types
tlh = TestLoggingHandler.create_fresh_handler()
run_section([{'for $i, $j {0} $foo'.format(iter_type): [{'log_i': '$i, $j'}]}],
{'foo': {'bar': 'barval', 'spam': 'spamval'}})
assert ('INFO', 'bar, barval') in tlh.msgs
assert ('INFO', 'spam, spamval') in tlh.msgs
示例2: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
self.ya.role = 'crt'
self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}}
self.ya._dependencies = [{'rpm': ['foo']}]
self.ya._dependencies_a = [{'rpm': ['bar']}]
self.ya._pre_run = [{'log_i': 'pre'}]
self.ya._run = [{'log_i': 'run'}]
self.ya._post_run = [{'log_i': 'post'}]
self.tlh = TestLoggingHandler.create_fresh_handler()
示例3: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.ya = yaml_assistant.YamlAssistant('ya', {}, '')
self.ya.role = 'creator'
self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}}
self.tlh = TestLoggingHandler.create_fresh_handler()
self.ya2 = yaml_assistant.YamlAssistant('ya2', {}, '')
self.ya2._files = {}
self.ya2.role = 'creator'
self.ya2._run = [{'if $ide':
[{'if $(test -d /notachance)': [{'log_d': 'ifif'}]},
{'else': [{'log_d': 'ifelse'}]}]},
{'else': [{'log_d': 'else'}]}]
示例4: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
if os.path.exists(self.cf):
os.unlink(self.cf)
self.cch = Cache()
self.tlh = TestLoggingHandler.create_fresh_handler()
示例5: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.tlh = TestLoggingHandler.create_fresh_handler()
示例6: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.yl = YamlAssistantLoader
self.reset_yl_assistants_dirs()
self.tlh = TestLoggingHandler.create_fresh_handler()
示例7: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.da = actions.DocAction
self.tlh = TestLoggingHandler.create_fresh_handler()
示例8: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.l = LogCommandRunner
self.tlh = TestLoggingHandler.create_fresh_handler()
示例9: setup_method
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def setup_method(self, method):
self.old_command_runners = command_runners.command_runners
command_runners.command_runners = copy.deepcopy(self.old_command_runners)
self.tlh = TestLoggingHandler.create_fresh_handler()
示例10: test_loop_two_control_vars
# 需要导入模块: from test.logger import TestLoggingHandler [as 别名]
# 或者: from test.logger.TestLoggingHandler import create_fresh_handler [as 别名]
def test_loop_two_control_vars(self):
tlh = TestLoggingHandler.create_fresh_handler()
run_section([{'for $i, $j in $foo': [{'log_i': '$i, $j'}]}],
{'foo': {'bar': 'barval', 'spam': 'spamval'}})
assert ('INFO', 'bar, barval') in tlh.msgs
assert ('INFO', 'spam, spamval') in tlh.msgs