• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python logger.TestLoggingHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mock_socket.reply_with函数代码示例发布时间:2022-05-27
下一篇:
Python libregrtest._parse_args函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap