当前位置: 首页>>代码示例>>Python>>正文


Python logger.TestLoggingHandler类代码示例

本文整理汇总了Python中test.logger.TestLoggingHandler的典型用法代码示例。如果您正苦于以下问题:Python TestLoggingHandler类的具体用法?Python TestLoggingHandler怎么用?Python TestLoggingHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TestLoggingHandler类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_loop_two_control_vars

 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
开发者ID:jkoncick,项目名称:devassistant,代码行数:7,代码来源:test_lang.py

示例2: setup_method

 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()
开发者ID:TomasTomecek,项目名称:devassistant,代码行数:10,代码来源:test_yaml_assistant.py

示例3: setup_method

    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'}]}]
开发者ID:sYnfo,项目名称:devassistant,代码行数:13,代码来源:test_yaml_assistant.py

示例4: setup_method

 def setup_method(self, method):
     if os.path.exists(self.cf):
         os.unlink(self.cf)
     self.cch = Cache()
     self.tlh = TestLoggingHandler.create_fresh_handler()
开发者ID:TomasTomecek,项目名称:devassistant,代码行数:5,代码来源:test_cache.py

示例5: setup_method

 def setup_method(self, method):
     self.tlh = TestLoggingHandler.create_fresh_handler()
开发者ID:phracek,项目名称:devassistant,代码行数:2,代码来源:test_lang.py

示例6: setup_method

 def setup_method(self, method):
     self.yl = YamlAssistantLoader
     self.reset_yl_assistants_dirs()
     self.tlh = TestLoggingHandler.create_fresh_handler()
开发者ID:sYnfo,项目名称:devassistant,代码行数:4,代码来源:test_yaml_assistant_loader.py

示例7: setup_method

 def setup_method(self, method):
     self.da = actions.DocAction
     self.tlh = TestLoggingHandler.create_fresh_handler()
开发者ID:phracek,项目名称:devassistant,代码行数:3,代码来源:test_actions.py

示例8: setup_method

 def setup_method(self, method):
     self.l = LogCommandRunner
     self.tlh = TestLoggingHandler.create_fresh_handler()
开发者ID:jumping,项目名称:devassistant,代码行数:3,代码来源:test_command_runners.py

示例9: setup_method

 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()
开发者ID:Rorosha,项目名称:devassistant,代码行数:4,代码来源:test_command_runners.py

示例10: test_loop_two_control_vars

 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
开发者ID:mmaslano,项目名称:devassistant,代码行数:6,代码来源:test_lang.py


注:本文中的test.logger.TestLoggingHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。